web stats
New Feature: Mirth logging replacement - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 01-29-2020, 06:42 AM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 165
odo is on a distinguished road
Default

Quote:
Originally Posted by hheldenbrand View Post
However, I am not able to get the customLogPath feature to work. I have tried quite a few different variations in my activation call, providing paths with a file name and without, in my home directory and in subfolders of Mirth's default logging folder:

Packages.lu.hrs.mirth.MetaAppender.activate("/opt/mirthconnect/logs/test/test.log");

In the current version, the meta appender is only created once, at the first call (usually the 1st time the global deploy script is called).
All subsequent calls will returned the cached instance. This is done for performance reasons.


Thus, if you would like a custom log path, you would have to provide this parameter where activate is called the first time. Alternatively you can simply change the log path in the configuration file (<MIRTH HOME>\conf\log4j.properties)

This custom path is however used for all log files. The logfile names are fix. (e.g. log files of channels are named like the channel). Thus, please provide the logpath without a filename.


I might change the code in a future version to detect, when parameters are changed. This, however, comprises a potential risk as two alternating calls from different locations with different values e.g. for the logfile location might result in unwanted behavior.


EDIT: When I think about it: An additional feature similar to the focus() feature might be a feasible way for securely supporting custom locations for single log files. I will have a look at that as soon as I get some time.

Last edited by odo; 01-29-2020 at 06:46 AM.
Reply With Quote
  #12  
Old 01-29-2020, 08:09 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,159
agermano is on a distinguished road
Default

odo, have you considered uploading your source code to github?
Reply With Quote
  #13  
Old 02-13-2020, 01:21 AM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 165
odo is on a distinguished road
Default

Quote:
Originally Posted by agermano View Post
odo, have you considered uploading your source code to github?
Project is now available on GitHub
Reply With Quote
  #14  
Old 02-13-2020, 10:05 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,159
agermano is on a distinguished road
Default

Awesome!
Reply With Quote
Reply

Tags
channel-centric, custom lib, feature, logging

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:29 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation