Vostok.Logging
HomeQuickstartModulesImplementations
1.0.0
1.0.0
  • Home
  • Quickstart
  • Guarantees
  • Configuration
  • Concepts and basics
    • Log interface
    • Log events
    • Syntax
      • Logging extensions
      • Message templates
      • Providing property values
    • Formatting
      • Output templates
      • Special properties
      • Format specifiers
    • Source context
    • Operation context
  • Modules
    • Abstractions
    • Configuration
    • Formatting
    • Console
    • File
    • Hercules
    • Context
    • Serilog
    • Log4net
    • NUnit
    • Microsoft
  • Implementations
    • Silent log
    • Console log
    • File log
    • Hercules log
  • Integrations
    • Serilog integration
    • Log4net integration
    • Microsoft logging integration
  • How-to guides
    • Using operation context
    • Using static log provider
    • Filtering events
    • Enriching events
    • Transforming events
    • Combining multiple logs
    • Custom output templates
    • External configuration rules
Powered by GitBook
On this page
  • Configuration
  • Usage tips
  1. Implementations

Hercules log

PreviousFile logNextIntegrations

Last updated 5 years ago

Location: module.

var herculesLog = new HerculesLog(new HerculesLogSettings(herculesSink, logStreamName));
var dynamicallyConfiguredLog = new HerculesLog(() => ObtainSettings());

HerculesLog converts incoming to according to and then sends resulting events with an instance of . Additional details on events mapping can be found in module's .

Configuration

HerculesLog is configured with HerculesLogSettings, having 2 mandatory parameters:

Option

Description

HerculesSink

An instance of sink to send events with.

Stream

Name of the Hercules stream to send events to.

Ensure that provided sink instance is configured with an API key with sufficient permissions to write into selected stream.

Usage tips

  • Prefer to use a singleton instance of IHerculesSink everywhere in the application, including HerculesLog. Sink instances involve background tasks and are therefore quite expensive.

  • Reporting of lost of log events generally depends on the nature of IHerculesSink implementation. Default implementation in repository provides a set of counters for these purposes.

Hercules
log events
Hercules events
Hercules log event schema
IHerculesSink
description on GitHub
vostok.hercules.client