-
Notifications
You must be signed in to change notification settings - Fork 0
b226876c 16cb 13d1 1f24 9c3820b689d2
Gets or sets the fully qualified filename.
Namespace: Plexdata.LogWriter.Settings
Assembly: Plexdata.LogWriter.Persistent (in Plexdata.LogWriter.Persistent.dll) Version: 1.0.7.1
C#
public string Filename { get; set; }
Type: String
The fully qualified name of the logging file.
IPersistentLoggerSettings.Filename
Exception | Condition |
---|---|
Exception | This property may throw several exceptions. For more information about these exceptions please see EnsureFullPathAndWriteAccessOrThrow(String). |
This property allows to change the fully qualified name of the assigned logging file.
The value assigned to this property can also contain environment variables, such as %TMP%
for example. But note, no matter which platform is used, each of the environment variables must be surrounded by a percentage character (%). Otherwise, resolving environment variables may fail and ends up in an exception.
Below find some examples of how to use environment variables in filenames.
C#
settings.Filename = "%TMP%\\output.log";
settings.Filename = "%TEMP%\\output.log";
settings.Filename = "%LOCALAPPDATA%\\Temp\\output.log";
settings.Filename = "%HOMEDRIVE%%HOMEPATH%\\AppData\\Local\\Temp\\output.log";
PersistentLoggerSettings Class
Plexdata.LogWriter.Settings Namespace
SettingsValidationExtension.EnsureFullPathAndWriteAccessOrThrow(String)