Show / Hide Table of Contents

Class FileLogger

Defines a logger class that writes log events to a file.

Inheritance
System.Object
FileLogger
Implements
ILogger
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Juhta.Net.Diagnostics
Assembly: Juhta.Net.dll
Syntax
public class FileLogger : ILogger

Constructors

| Improve this Doc View Source

FileLogger()

Initializes a new instance.

Declaration
public FileLogger()
| Improve this Doc View Source

FileLogger(String)

Initializes a new instance.

Declaration
public FileLogger(string logFilePath)
Parameters
Type Name Description
System.String logFilePath

Specifies a log file path. The path can be relative or absolute. Can be null in which case the default log file path will be used. The default value will also be used if logFilePath specifies somehow an invalid log file path.

Remarks

The default log file will be written to the current user's temp folder with the process name.

If the log file already exists, new rows will be appended to the end of the file.

Properties

| Improve this Doc View Source

IsThreadSafe

See IsThreadSafe.

Declaration
public bool IsThreadSafe { get; }
Property Value
Type Description
System.Boolean
Remarks

This logger is not thread-safe, we let the static Logger class to take care of the synchronization.

Methods

| Improve this Doc View Source

LogAlert(AlertMessage)

See LogAlert(AlertMessage).

Declaration
public void LogAlert(AlertMessage message)
Parameters
Type Name Description
AlertMessage message
| Improve this Doc View Source

LogAlert(AlertMessage, Object[])

See LogAlert(AlertMessage, Object[]).

Declaration
public void LogAlert(AlertMessage message, params object[] args)
Parameters
Type Name Description
AlertMessage message
System.Object[] args
| Improve this Doc View Source

LogAlert(String)

See LogAlert(String).

Declaration
public void LogAlert(string message)
Parameters
Type Name Description
System.String message
| Improve this Doc View Source

LogAlert(String, Object[])

See LogAlert(String, Object[]).

Declaration
public void LogAlert(string messageFormat, params object[] args)
Parameters
Type Name Description
System.String messageFormat
System.Object[] args
| Improve this Doc View Source

LogError(ErrorMessage)

See LogError(ErrorMessage).

Declaration
public void LogError(ErrorMessage message)
Parameters
Type Name Description
ErrorMessage message
| Improve this Doc View Source

LogError(ErrorMessage, Object[])

See LogError(ErrorMessage, Object[]).

Declaration
public void LogError(ErrorMessage message, params object[] args)
Parameters
Type Name Description
ErrorMessage message
System.Object[] args
| Improve this Doc View Source

LogError(Exception)

See LogError(Exception).

Declaration
public void LogError(Exception exception)
Parameters
Type Name Description
System.Exception exception
| Improve this Doc View Source

LogError(Exception, ErrorMessage)

See LogError(Exception, ErrorMessage).

Declaration
public void LogError(Exception exception, ErrorMessage message)
Parameters
Type Name Description
System.Exception exception
ErrorMessage message
| Improve this Doc View Source

LogError(Exception, ErrorMessage, Object[])

See LogError(Exception, ErrorMessage, Object[]).

Declaration
public void LogError(Exception exception, ErrorMessage message, params object[] args)
Parameters
Type Name Description
System.Exception exception
ErrorMessage message
System.Object[] args
| Improve this Doc View Source

LogError(Exception, String)

See LogError(Exception, String).

Declaration
public void LogError(Exception exception, string message)
Parameters
Type Name Description
System.Exception exception
System.String message
| Improve this Doc View Source

LogError(Exception, String, Object[])

See LogError(Exception, String, Object[]).

Declaration
public void LogError(Exception exception, string messageFormat, params object[] args)
Parameters
Type Name Description
System.Exception exception
System.String messageFormat
System.Object[] args
| Improve this Doc View Source

LogError(String)

See LogError(String).

Declaration
public void LogError(string message)
Parameters
Type Name Description
System.String message
| Improve this Doc View Source

LogError(String, Object[])

See LogError(String, Object[]).

Declaration
public void LogError(string messageFormat, params object[] args)
Parameters
Type Name Description
System.String messageFormat
System.Object[] args
| Improve this Doc View Source

LogEvent(DiagnosticMessage)

See LogEvent(DiagnosticMessage).

Declaration
public void LogEvent(DiagnosticMessage message)
Parameters
Type Name Description
DiagnosticMessage message
| Improve this Doc View Source

LogEvent(DiagnosticMessage, Object[])

See LogEvent(DiagnosticMessage, Object[]).

Declaration
public void LogEvent(DiagnosticMessage message, params object[] args)
Parameters
Type Name Description
DiagnosticMessage message
System.Object[] args
| Improve this Doc View Source

LogInformation(InformationMessage)

See LogInformation(InformationMessage).

Declaration
public void LogInformation(InformationMessage message)
Parameters
Type Name Description
InformationMessage message
| Improve this Doc View Source

LogInformation(InformationMessage, Object[])

See LogInformation(InformationMessage, Object[]).

Declaration
public void LogInformation(InformationMessage message, params object[] args)
Parameters
Type Name Description
InformationMessage message
System.Object[] args
| Improve this Doc View Source

LogInformation(String)

See LogInformation(String).

Declaration
public void LogInformation(string message)
Parameters
Type Name Description
System.String message
| Improve this Doc View Source

LogInformation(String, Object[])

See LogInformation(String, Object[]).

Declaration
public void LogInformation(string messageFormat, params object[] args)
Parameters
Type Name Description
System.String messageFormat
System.Object[] args
| Improve this Doc View Source

LogWarning(WarningMessage)

See LogWarning(WarningMessage).

Declaration
public void LogWarning(WarningMessage message)
Parameters
Type Name Description
WarningMessage message
| Improve this Doc View Source

LogWarning(WarningMessage, Object[])

See LogWarning(WarningMessage, Object[]).

Declaration
public void LogWarning(WarningMessage message, params object[] args)
Parameters
Type Name Description
WarningMessage message
System.Object[] args
| Improve this Doc View Source

LogWarning(String)

See LogWarning(String).

Declaration
public void LogWarning(string message)
Parameters
Type Name Description
System.String message
| Improve this Doc View Source

LogWarning(String, Object[])

See LogWarning(String, Object[]).

Declaration
public void LogWarning(string messageFormat, params object[] args)
Parameters
Type Name Description
System.String messageFormat
System.Object[] args

Implements

ILogger
  • Improve this Doc
  • View Source
Back to top Copyright © 2017-2019 Juha Lähteenmäki
Generated by DocFX