How to enable logging of all chats to a file in AzerothCore? - azerothcore

I'm trying to enable the logging of all chats to a file, but since the configuration changed from the last time, now I'm struggling to figure how to do it. I have read the wiki article about the new logging system (Loggers and Appenders) and added this line to my conf:
Logger.chat.log=4,Chat.log,a
But nothing seems to happen.
Could anyone please help me with it?
Thanks!
Edit: So currently my chat log settings look like this:
Appender.Chat=2,4,1,chat_%s.log
Logger.chat.log=4,Chat
Logger.chat.system=4,Chat
Logger.chat.say=4,Chat
Unfortunately it's not working. There isn't even an empty chat log file in the folder.
I don't understand what I'm doing wrong. I created a new appender Chat which points to a file. And also enabled a logger Logger.chat* (taken from the conf) pointing to the new appender.

Create new appender if need
Appender.Chat=2,5,0,Chat.log
And create logger
Logger.chat.log=5,Chat

Related

Writing logs to files using Serilog is not working

I have an ASP .NET based application that uses Serilog for logging and I want to test it by writing my logs to files. I am using Serilog and Serilog.Sinks.File
So far, the code looks like this:
_perfLogger = new LoggerConfiguration()
.WriteTo.File("C:\\Users\\andav\\Desktop\\NewTest\\logger\\perf.txt")
.CreateLogger();
_perfLogger.Write(LogEventLevel.Information, "{#LogDetail}", infoToLog);
But all my files are empty or are not created and I am not getting any errors.
Am I doing something wrong?
Thank you.
You may be able to if you add read/write permission for IIS_IUSRS on the directory.
I usually put the log directory in the same directory as my IIS app and do the following:
You need local admin permissions:
Right-click on the directory that you want to log file in
Choose properties
Go to Security tab
Click Edit
Click Add
Type IIS_IUSRS
Click on Check Names
If it cannot find it then click on locations
Click on your computer name and click ok
Now click on check names and it should resolve.
...
Click OK
Give the Modify Permission
Click OK
Logging "should" work
If it is a directory outside of inetpub, I am not sure but worth a try.
-Gina
I didn`t know that .Net is not allowed to write in any other folder except App_Data. This was the problem and I managed to fix it.

How to change previous date log file permision to read only in Log4Net?

I am using Log4Net in my window application, Now i want to change the permission of my all previous date logs to read only automatically and only current date log file will remain same or not changed. How can i do this using Log4Net or is it possible in any other plugin like Elmah ?
This is not possible out of the box. You can invest to extend the file appender you are using to make the file ReadOnly when it is rolled. You can see the find the log4net source code here. Look for the appenders and then extend/ or copy that appender in you project. Make the changes and then use your own appender in the configuration.

Trouble with getting configuration file FCM

I create application in firebase console, filled application name and fingertrip fileds. Then i try download configuration file google-service.gson and getting message "Failed-Forbidden". What is it and what am I supposed to do?
Problem was in two google accounts. Need exit from one before getting configuration file.

Demandware - Pipeline not found for current domain

I already made pipeline. Which is working fine. Suddenly it give error like
2015-12-18 02:39:08.091 GMT] ERROR system.core ISH-CORE-2368 Sites-SiteGenesis-Site core Storefront [uuid] [request-id]-0-00 [timestamp] "Error executing pipeline: Hello com.demandware.beehive.core.capi.pipeline.PipelineExecutionException:Pipeline not found (Hello) for current domain (Sites-SiteGenesis-Site)"
Does anybody know how to solve this?
In the event that your pipeline can not be found for the selected domain, please go trough and verify all of the following:
Double check Pipeline-Node naming
Pipeline URLs are generated by their name and your desired entry node, in this scenario, I would expect a file named Hello.xml in you cartridge's pipeline directory, and a start node named Start, would be accessed via {instanceURL}/on/demandware.store/Sites-mySite-Site/Hello-Start
Try and force upload of your cartridges
Occasionally the files on the server will not be updated correctly when a save is made; to force an update, right click your project, click Demandware > Upload Cartridges
Check your Cartridge Path
If you are using a shared instance, or your instance is re-provisioned, you may need to check your cartridge path to be sure your custom cartridge(s) are still there.
Check your Code Versions
Occasionally you may increment / change your code version - if you do, make sure that the path you select in Studio is the one that you have selected in Business Manager.
Tech Support
Should you still have issues following the four steps above, please file a support ticket and the tech-support team will be able to provide you with more assistance.

How to change configuration in memory

Im wondering if this is possible. I would really like to ship my application with no configuration file (stop users fiddling with it). Is it possible to set all the configuration in memory in say the global.asax (application_start) event? For example I dont want users messing directly with the connection string I want them to be able to modify it in the gui only. And i dont want to have to write to the config file as there may be security issues....
you could still use the file system and have the files encrypted. In this way only you can modify or from the app, but no one can really modify the configurations directly from the file. Also you could encrypt Configuration Sections: Check this Microsoft Link out.
Good luck!

Resources