Logging in Photon
Options
Hi,
i'm new to Photon technologies and i'm a bit stuck at the logging part.
First, i don't understand why the log4net.config of my application is rewritten each time i rebuild my application? How i'm suppose to make persistent configurations?
Next, it may seems simple but i can't manage to log to console, even if i use the correct appender, only in files seems to work.
Thanks for reading me!
i'm new to Photon technologies and i'm a bit stuck at the logging part.
First, i don't understand why the log4net.config of my application is rewritten each time i rebuild my application? How i'm suppose to make persistent configurations?
Next, it may seems simple but i can't manage to log to console, even if i use the correct appender, only in files seems to work.
Thanks for reading me!
0
Comments
-
Hi, TOADD
log4net.config is part of solution. You should change it there. When you change it, it will be copied to output folder
About your second question:
I do not know what is going on with your console. First of all you should have consle to see console output, if you do not log4net will not create consle for you, may be that is why you do not see anything0 -
Thanks,
but how can i make my photon application run a console at start so log4net can log to it?0 -
PhotonSocketServer is not console application.
may be if you will start it from console, you will get what you want. But i'm not sure. use _run-Photon-as-application.start.cmd to start from console. probably, you will need to modify it
Another question:
Why do you need console? You could use file with BareTail or other log file viewer.0 -
Thanks for pointing me out the fact that i could use a log file viewer, it perfectly feets my needs.
Thanks again.0 -
You can also log directly to a cloud-based log provider, this way you don’t have to manage log storage and parsing yourself and can search them MUCH easier. Loggly has a package for Log4net available here: https://www.loggly.com/docs/net-logs/.0