Show / Hide Table of Contents

Class Log

Wrapper for message logging functions.

Inheritance
System.Object
Log
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: NetVips
Assembly: NetVips.dll
Syntax
public static class Log

Methods

| Improve this Doc View Source

PrintLogFunction(String, Enums.LogLevelFlags, String)

Common logging method.

Declaration
public static void PrintLogFunction(string domain, Enums.LogLevelFlags level, string message)
Parameters
Type Name Description
System.String domain

The log domain of the message.

Enums.LogLevelFlags level

The log level of the message (including the fatal and recursion flags).

System.String message

The message to process.

Remarks

Sample usage:

// Print the messages for the NULL domain
var logFunc = new LogFunc(Log.PrintLogFunction);
Log.SetLogHandler(null, Enums.LogLevelFlags.All, logFunc);
| Improve this Doc View Source

PrintTraceLogFunction(String, Enums.LogLevelFlags, String)

Common logging method.

Declaration
public static void PrintTraceLogFunction(string domain, Enums.LogLevelFlags level, string message)
Parameters
Type Name Description
System.String domain

The log domain of the message.

Enums.LogLevelFlags level

The log level of the message (including the fatal and recursion flags).

System.String message

The message to process.

Remarks

Sample usage:

// Print messages and stack trace for vips critical messages
var logFunc = new LogFunc(Log.PrintTraceLogFunction);
Log.SetLogHandler("VIPS", Enums.LogLevelFlags.Critical, logFunc);
| Improve this Doc View Source

RemoveLogHandler(String, UInt32)

Removes the log handler.

Declaration
public static void RemoveLogHandler(string logDomain, uint handlerId)
Parameters
Type Name Description
System.String logDomain

The log domain.

System.UInt32 handlerId

The id of the handler, which was returned in SetLogHandler(String, Enums.LogLevelFlags, Log.LogDelegate).

| Improve this Doc View Source

SetAlwaysFatal(Enums.LogLevelFlags)

Sets the message levels which are always fatal, in any log domain. When a message with any of these levels is logged the program terminates.

Declaration
public static Enums.LogLevelFlags SetAlwaysFatal(Enums.LogLevelFlags fatalMask)
Parameters
Type Name Description
Enums.LogLevelFlags fatalMask

The mask containing bits set for each level of error which is to be fatal.

Returns
Type Description
Enums.LogLevelFlags

The old fatal mask.

| Improve this Doc View Source

SetAlwaysFatal(String, Enums.LogLevelFlags)

Sets the log levels which are fatal in the given domain.

Declaration
public static Enums.LogLevelFlags SetAlwaysFatal(string logDomain, Enums.LogLevelFlags fatalMask)
Parameters
Type Name Description
System.String logDomain

The log domain.

Enums.LogLevelFlags fatalMask

The new fatal mask.

Returns
Type Description
Enums.LogLevelFlags

The old fatal mask for the log domain.

| Improve this Doc View Source

SetLogHandler(String, Enums.LogLevelFlags, Log.LogDelegate)

Sets the log handler for a domain and a set of log levels.

Declaration
public static uint SetLogHandler(string logDomain, Enums.LogLevelFlags flags, Log.LogDelegate logFunc)
Parameters
Type Name Description
System.String logDomain

The log domain, or null for the default "" application domain.

Enums.LogLevelFlags flags

The log levels to apply the log handler for.

Log.LogDelegate logFunc

The log handler function.

Returns
Type Description
System.UInt32

The id of the handler.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX