Class CreateLoggerEffector
Inheritance
CreateLoggerEffector
Assembly: Xareus.Unity.Libraries.dll
Syntax
[FunctionDescription("Create a new file logger.", new string[] { "Logging" })]
public class CreateLoggerEffector : AUnityEffector
Constructors
CreateLoggerEffector(Event, Dictionary<string, Parameter>, ContextHolder)
Declaration
public CreateLoggerEffector(Event @event, Dictionary<string, Parameter> parameters, ContextHolder contexts)
Parameters
Fields
AppendDateTime
Declaration
[ConfigurationParameter("AppendDateTime", true, "Whether to append the current date and time to the file name. If true, the date and time will be appended in the format _yyyy-MM-dd_HH-mm-ss.", Necessity.Required)]
protected bool AppendDateTime
Field Value
EnableLogIdPrefix
Declaration
[ConfigurationParameter("EnableLogIdPrefix", true, "Whether to enable the log id prefix in the log messages. If true, the log id will be prefixed to each log message written to this logger.", Necessity.Required)]
protected bool EnableLogIdPrefix
Field Value
Extension
Declaration
[ConfigurationParameter("Extension", ".txt", "The extension of the log file to create. If AppendDateTime is true, the current date and time will be appended to the file name before the extension.", Necessity.Required)]
protected string Extension
Field Value
FileName
Declaration
[ConfigurationParameter("FileName", "The name of the log file to create. Elements will be joined with a space. If AppendDateTime is true, the current date and time will be appended to the file name.", Necessity.Required)]
protected List<string> FileName
Field Value
Id
Declaration
[ConfigurationParameter("Id", "The id of the logger to create. This id can be used in other effectors to write to the log file.", Necessity.Required)]
protected string Id
Field Value
LogDirectory
Declaration
[ConfigurationParameter("LogDirectory", "The directory where the log file will be created. If not specified, the log file will be created in the default log directory.", Necessity.Optional)]
protected string LogDirectory
Field Value
Methods
SafeEffectorUpdate()
Actual effector code. Note that this code will be executed in unity's thread
Declaration
public override void SafeEffectorUpdate()
Overrides