How to use NLog's MutexMultiProcessFileAppender? - nlog

I failed to find any information about using this appender implementation (e.g. how to configure it in NLog.config). Thanks.

If you configure the file target to use ConcurrentWrites, the MutexMultiProcessFileAppender will be used

Related

Where to put custom java file of hazelcast custom mapstore implementation

I have implemented a custom MaStore for hazelcast. But I have no idea where to put this .java file ,so that hazelcast will build it and pick it.
Any help in this is appreciated.
Please see the sample here, see how the PersonMapStore class is located inside project hierarchy and it's mentioned in the configuration file.

Server created using hazelcast-3.6.jar is not picking up configs from hazelcast.xml

I am using spring boot to test my Rest API's with hazelcast-3.6 as the DB.I am using hazelcast-3.6.jar to setup a server.The server created this way is not picking up properties from hazelcast.xml provided.Can someone guide me how to make it pick up the properties from hazelcast.xml?
Run you program with -Dhazelcast.config=<path to hazelcast.xml> or put your hazelcast.xml in the classpath.
Make sure to put the hazelcast.xml to the right directory.
Please check the Checking configuration manual section where it's explained what's the order of config file check:
http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#checking-configuration
Please find the examples of using Hazelcast with Spring Boot here.
Here you can find how to configure Hazelcast with Spring.

log4j extras in OSGi environment

I want to use the log4j-extras-1.1.jar in OSGi environment (Fuse Fabric 7.1.0.fuse-047)
so that I can use archive feature of org.apache.log4j.rolling.RollingFileAppender
What are simplest steps to achieve that?
It can't easily be done, and you actually don't need it. The used Pax-Logging provides a ZippedRollingFile appender out-of-the-box:
org.apache.log4j.zip. ZipRollingFileAppender

Integrate my custom mediator with WSO2 ESB log4j

I am writing my own custom mediator. In my custom mediator, I use log4j to log the process.. But I am facing difficulties now when deploy the custom mediator in WSO2. What I want is the log in my custom mediator will be written in the "wso2carbon.log". But unfortunately I still have no clue how to do that. Do I need to configure the log4j.properties here? or do I need to implement or extends something in my custom mediator? Thanks :)
Yes this can also be done by adding the package name along with log type needed in the log4j.properties. Doing it through the management console is also an option and you can refer http://docs.wso2.org/display/ESB470/Setting+Up+Logging to get an idea on how to do it.
I solve this using the Management Console in WSO2. In my custom mediator I use the 'info' level, and in WSO2 I think the custom mediator will have the default 'error' level. So I change the level to 'info' level, and the log is shown in the wso2 log file :)

Can I have multiple log4net configuration files?

Can I have multiple log4net configurations for the same program? Functionality similar to Spring's <import> element would be optimal. The idea here would to have multiple programs that have their own log4net configuration, as well as sharing a central log4net configuration file containing a shared error log (so that definition isn't repeated). Alternatively is this functionality possible with .NET Common Logging?
Related: log4net - configure using multiple configuration files
you can achieve this by using named repositories i think
log4net.LogManager.CreateRepository(repositoryName)
log4net.Config.XmlConfigurator.Configure(repositoryName, configFile)
then by using
LogManager.GetLogger(repositoryName,loggerName)
you can get the corresponding logger.
Not out-of-the-box. You must implement yourself the merging of different config files into a single XmlNode and pass this to log4net XmlConfiguratot.
An example is to be found here: http://www.kopf.com.br/kaplof/using-multiple-configuration-files-with-log4net

Resources