Log exception in a file using play - exception

I want to log the exceptions in a log file using play 1.
Can anyone tell me how to configure it?
If it is a duplicate question, point it.
TIA

You could use create a custom log4j.properties in the conf/ directory:
Please see logging for production for details.

Related

NLog configuration changed programmatically saved back to config file

I have an application using NLog for logging. My configuration is stored in NLog.config file, but I need to provide option to change it for the user. I know how to change Logger configuration, but is it possible to save such changed configuration back to NLog.config file programmatically so it stays changed also after application stopped?
Thanks a lot!
Marek
I had more or else similar issue. I needed to edit the nlog config file. since i was using net2.0 , I was not able to use linq to edit the nlog config file . but edited the file using xdocument.
hope the link below helps.
how to edit the nlog config file programmatically
You can follow the following link which gives a details about Configuration API which may help you.

Logback does not recreate deleted logfiles on Linux

I'm using Logback's RollingFileAppender on a Linux server. If I delete the logfile while the process is running Logback (1.0.13) does not seem to recreate it and log messages are lost.
I found another related question, where the answer is that the recovery mechanism is OS specific.
Has anyone found a way to have Logback recreate the file or call a StatusListener if it detects that the file has been deleted?
Solved it using a custom FileAppender that extends RollingFileAppender and overrides writeOut(). Use openFile(getFile()) to recreate the file after checking that it does not exist.

is it possible to start activemq with a configuration file that's not in one of the default locations?

All right all you activemq guru's out there...
Currently activemq require a configuration file before it runs. It appears from its debug output message:
$ ./activemq start -h
INFO: Using default configuration (you can configure options in one of these file: /etc/default/activemq /home/user_name/.activemqrc)
That you can only put it in one of those two locations. Anybody know if this is the case? Is there some command line parameter to specify its location?
Thanks!
-roger-
Yes, it is possible. Here are 3 possible answers.
If classpath is setup properly:
activemq start xbean:myconfig.xml
activemq start xbean:file:./conf/broker1.xml
Not using the classpath:
activemq start xbean:file:C:/ActiveMQ/conf/broker2.xml
reference:
http://activemq.apache.org/activemq-command-line-tools-reference.html
I have not been able to find the answer to this and I struggled with this myself for a while, but I've found a bit of a workaround. When you use bin/activemq create, you can create a runnable instance that will have its own bin, conf, and data directories. Then you have more control over that runnable insance and the .activemqrc becomes less important.
See this for detail on the create option : http://activemq.apache.org/unix-shell-script.html
Try this:
bin/activemq start xbean:/home/user/activemq.xml
Note that if the xml file includes other files like jetty.xml then it needs to be in that dir also.
If using a recent 5.6 SNAPSHOT you can set the env var ACTIVEMQ_CONF to point to the location where you have the config files
in the /bin/activemq script under # CONFIGURATION # For using instances, you can add or remove any file destinations you'd like.
Be very though since it ignores the others at the first occurrency of a file, read more here
Unix configuration
happy coding !

SSIS 2008 information warning when executing a package

Has anybody already faced a message like:
Information while loading package1:The package is attempting to configure from the XML file \xxxx\yyyyy\package1.dtsconfig
So I did set a configuration file to my package but I'm just wondering why I got this message even though the package is successfully executed.
This is expected behaviour. There is an option per package to suppress this message,
SuppressConfigurationWarnings
If you don't want to edit your packages, you can try the SET option on package invocation /SET "\Package.Properties[SuppressConfigurationWarnings]";1
I believe that is not a warning, just some information.
It is useful when debugging to help you make sure it is loading the correct configurations. If it failed to load the configurations you would have a a 'real' warning saying that it failed to load the configurations from said file.
This also happens when using parent package variables
I would say that this is an info message that the configuration is being loaded but Its the first time I'm seeing it even though I use configuration files all the time. Are you sure your config file is ok? Can you post it here so we can take a look?

Parsed Console Output Error in Hudson

im running Hudson continuous integration for db unit.
when i run the job the console output is displaying the SUCCESS, but then why do the Parsed Console Output keep returning this error:
ERROR:Failed to parse console log :
log-parser plugin ERROR: Cannot parse log: Can't read parsing rules file:
i already installed the parse-log plugin & i already restarted the Hudson..
i installed the plugin using remote PC
any help and suggestion is appreciated. Thanks!
1) Place the Parser Rule File in the JENKINS_HOME location.
2) Configure that log parser console output in the Global COnfiguration settings and Name it.
3) Add this option in the Post Build Actions and Select the Name
ok silly me..
i forgot to configure the global configuration in hudson that link to the parser rule file..
problem solved.
I'm posting this in case anyone else has a specific case of this problem. This issue started when upgrading from 1.509.2 to 1.554.3... I had the parsing rules file in the win\system folder which was a known issue when running Jenkins as a service. Well I guess they fixed it by this version. I moved the parsing rules back into Jenkins Home folder and it worked fine again.