PhpTek\Sentry\Log\SentryLogger
The SentryLogger class is a bridge between {@link SentryAdaptor} and SilverStripe's use of Monolog.
Synopsis
class SentryLogger
{
- // constants
- const SLW_NOOP = 'Unavailable';
- const DEFAULT_FRAME_VAL = 'Unknown';
- // members
- public SentryAdaptor $adaptor = NULL;
- // methods
- public static SentryLogger factory()
- public SentryAdaptor getAdaptor()
- public SentryLogger setAdaptor()
- public string defaultEnv()
- public array defaultTags()
- public array defaultExtra()
- public static string get_req_type()
- public static string get_peak_memory()
- public string getUserAgent()
- public static string get_req_method()
- public static string get_sapi()
- public static string get_package_info()
- public static string get_app_info()
- public static string get_ip()
- public static array user_data()
- public static array backtrace()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Constants
Name | Value |
---|---|
SLW_NOOP | 'Unavailable' |
DEFAULT_FRAME_VAL | 'Unknown' |
Members
public
- $adaptor — PhpTek\Sentry\Adaptor\SentryAdaptor
Methods
public
- backtrace() — Manually extract or generate a suitable backtrace. This is especially useful in non-exception reports such as those that use Sentry\Client::captureMessage().
- defaultEnv() — Returns a default environment when one isn't passed to the factory() method.
- defaultExtra() — Returns a default set of extra data to show upon selecting a message for analysis in the Sentry UI. This can augment the data sent to Sentry at setup time in _config.php as well as at runtime when calling SS_Log itself.
- defaultTags() — Returns a default set of additional "tags" we wish to send to Sentry.
- factory() — Factory, consumed by {@link SentryHandler}.
- getAdaptor()
- getUserAgent() — Basic User-Agent check and return.
- get_app_info() — Format and return a string of metadata about the app in which this module is installed.
- get_ip() — Returns the client IP address which originated this request.
- get_package_info()
- get_peak_memory() — Return peak memory usage.
- get_req_method() — Basic request method check and return.
- get_req_type() — What sort of request is this? (A harder question to answer than you might think: http://stackoverflow.com/questions/6275363/what-is-the-correct-terminology-for-a-non-ajax-request)
- get_sapi()
- setAdaptor()
- user_data() — Returns a default set of additional data specific to the user's part in the request.