gi-soup-2.4.11: Libsoup bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Soup.Objects.Logger

Contents

Description

 

Synopsis

Exported types

newtype Logger Source #

Constructors

Logger (ManagedPtr Logger) 

Instances

GObject Logger Source # 

Methods

gobjectType :: Logger -> IO GType #

IsObject Logger Source # 
IsLogger Logger Source # 
IsSessionFeature Logger Source # 
((~) * info (ResolveLoggerMethod t Logger), MethodInfo * info Logger p) => IsLabel t (Logger -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Logger -> p #

((~) * info (ResolveLoggerMethod t Logger), MethodInfo * info Logger p) => IsLabelProxy t (Logger -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Logger -> p #

HasAttributeList * Logger Source # 
type AttributeList Logger Source # 
type SignalList Logger Source # 

Methods

attach

data LoggerAttachMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsLogger a, IsSession b) => MethodInfo * LoggerAttachMethodInfo a signature Source # 

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

data LoggerDetachMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsLogger a, IsSession b) => MethodInfo * LoggerDetachMethodInfo a signature Source # 

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

data LoggerSetPrinterMethodInfo Source #

Instances

((~) * signature (LoggerPrinter -> m ()), MonadIO m, IsLogger a) => MethodInfo * LoggerSetPrinterMethodInfo a signature Source # 

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

data LoggerLevelPropertyInfo Source #

Instances

AttrInfo LoggerLevelPropertyInfo Source # 
type AttrOrigin LoggerLevelPropertyInfo Source # 
type AttrLabel LoggerLevelPropertyInfo Source # 
type AttrGetType LoggerLevelPropertyInfo Source # 
type AttrBaseTypeConstraint LoggerLevelPropertyInfo Source # 
type AttrSetTypeConstraint LoggerLevelPropertyInfo Source # 
type AttrAllowedOps LoggerLevelPropertyInfo Source # 

maxBodySize

data LoggerMaxBodySizePropertyInfo Source #

Instances

AttrInfo LoggerMaxBodySizePropertyInfo Source # 
type AttrOrigin LoggerMaxBodySizePropertyInfo Source # 
type AttrLabel LoggerMaxBodySizePropertyInfo Source # 
type AttrGetType LoggerMaxBodySizePropertyInfo Source # 
type AttrBaseTypeConstraint LoggerMaxBodySizePropertyInfo Source # 
type AttrSetTypeConstraint LoggerMaxBodySizePropertyInfo Source # 
type AttrAllowedOps LoggerMaxBodySizePropertyInfo Source #