Is there any way to disable the log writing on file?
We have some issues regarding the file writing, so we've decided to disable it at all, but unsuccessful
We tried to comment the section "fileLogger" in the web.config, like this:
<loggers>
<!--<fileLogger filename="|DataDirectory|cms-log-%yyyy%mm.txt" treshold="Major" />-->
<debugLogger treshold="Info" />
</loggers>
But we still getting the following error message:
[DirectoryNotFoundException: Could not find a part of the path 'D:\root\DVL\MyProject\MySite.Site\'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +271
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1291
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +144
System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) +126
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) +103
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +30
System.IO.File.InternalAppendAllText(String path, String contents, Encoding encoding) +63
Kaliko.LogProviders.FileLogProvider.Write(LogItem item) +39
Kaliko.Logger.WriteToProviders(Severity serverity, LogItem logItem) +145
KalikoCMS.Serialization.JsonSerialization.DeserializeTypedJson(String json) +218
Reading your code if none file provider is configured, none log writing should be expected, but not seems be true.
Thanks in advance.
Best regards,
Davide
As well as |DataDirectory| returns the "App_Data" folder we need something to get the servername, a variabile called |MachineName| or |ServerName| for instance.
Do you think that it is possible?
Thanks again in advance
regards,
Davide
best regards,
Davide
I've tested the new version and for our purposes works as expected.
Please, let us know when you'll release this version over Nuget.
Thanks again!
regards,
Davide