gi-soup-2.4.23: Libsoup bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Soup.Objects.Logger

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Logger Source #

Memory-managed wrapper type.

Constructors

Logger (ManagedPtr Logger) 

Instances

Instances details
Eq Logger Source # 
Instance details

Defined in GI.Soup.Objects.Logger

Methods

(==) :: Logger -> Logger -> Bool

(/=) :: Logger -> Logger -> Bool

GObject Logger Source # 
Instance details

Defined in GI.Soup.Objects.Logger

ManagedPtrNewtype Logger Source # 
Instance details

Defined in GI.Soup.Objects.Logger

Methods

toManagedPtr :: Logger -> ManagedPtr Logger

TypedObject Logger Source # 
Instance details

Defined in GI.Soup.Objects.Logger

Methods

glibType :: IO GType

IsGValue Logger Source #

Convert Logger to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Soup.Objects.Logger

Methods

toGValue :: Logger -> IO GValue

fromGValue :: GValue -> IO Logger

HasParentTypes Logger Source # 
Instance details

Defined in GI.Soup.Objects.Logger

type ParentTypes Logger Source # 
Instance details

Defined in GI.Soup.Objects.Logger

type ParentTypes Logger = '[Object, SessionFeature]

class (GObject o, IsDescendantOf Logger o) => IsLogger o Source #

Type class for types which can be safely cast to Logger, for instance with toLogger.

Instances

Instances details
(GObject o, IsDescendantOf Logger o) => IsLogger o Source # 
Instance details

Defined in GI.Soup.Objects.Logger

toLogger :: (MonadIO m, IsLogger o) => o -> m Logger Source #

Cast to Logger, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

attach

loggerAttach Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a, IsSession b) 
=> a

logger: a Logger

-> b

session: a Session

-> m () 

Deprecated: Use sessionAddFeature instead.

Sets logger to watch session and print debug information for its messages.

(The session will take a reference on logger, which will be removed when you call loggerDetach, or when the session is destroyed.)

detach

loggerDetach Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a, IsSession b) 
=> a

logger: a Logger

-> b

session: a Session

-> m () 

Deprecated: Use sessionRemoveFeature instead.

Stops logger from watching session.

new

loggerNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> LoggerLogLevel

level: the debug level

-> Int32

maxBodySize: the maximum body size to output, or -1

-> m Logger

Returns: a new Logger

Creates a new Logger with the given debug level. If level is LoggerLogLevelBody, maxBodySize gives the maximum number of bytes of the body that will be logged. (-1 means "no limit".)

If you need finer control over what message parts are and aren't logged, use loggerSetRequestFilter and loggerSetResponseFilter.

setPrinter

loggerSetPrinter Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a) 
=> a

logger: a Logger

-> LoggerPrinter

printer: the callback for printing logging output

-> m () 

Sets up an alternate log printing routine, if you don't want the log to go to <literal>stdout</literal>.

setRequestFilter

loggerSetRequestFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a) 
=> a

logger: a Logger

-> LoggerFilter

requestFilter: the callback for request debugging

-> m () 

Sets up a filter to determine the log level for a given request. For each HTTP request logger will invoke requestFilter to determine how much (if any) of that request to log. (If you do not set a request filter, logger will just always log requests at the level passed to loggerNew.)

setResponseFilter

loggerSetResponseFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a) 
=> a

logger: a Logger

-> LoggerFilter

responseFilter: the callback for response debugging

-> m () 

Sets up a filter to determine the log level for a given response. For each HTTP response logger will invoke responseFilter to determine how much (if any) of that response to log. (If you do not set a response filter, logger will just always log responses at the level passed to loggerNew.)

Properties

level

The level of logging output

Since: 2.56

constructLoggerLevel :: (IsLogger o, MonadIO m) => LoggerLogLevel -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “level” property. This is rarely needed directly, but it is used by new.

getLoggerLevel :: (MonadIO m, IsLogger o) => o -> m LoggerLogLevel Source #

Get the value of the “level” property. When overloading is enabled, this is equivalent to

get logger #level

setLoggerLevel :: (MonadIO m, IsLogger o) => o -> LoggerLogLevel -> m () Source #

Set the value of the “level” property. When overloading is enabled, this is equivalent to

set logger [ #level := value ]

maxBodySize

If Logger:level is LoggerLogLevelBody, this gives the maximum number of bytes of the body that will be logged. (-1 means "no limit".)

Since: 2.56

constructLoggerMaxBodySize :: (IsLogger o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “max-body-size” property. This is rarely needed directly, but it is used by new.

getLoggerMaxBodySize :: (MonadIO m, IsLogger o) => o -> m Int32 Source #

Get the value of the “max-body-size” property. When overloading is enabled, this is equivalent to

get logger #maxBodySize

setLoggerMaxBodySize :: (MonadIO m, IsLogger o) => o -> Int32 -> m () Source #

Set the value of the “max-body-size” property. When overloading is enabled, this is equivalent to

set logger [ #maxBodySize := value ]