Skip to content

hectorescalante/serilog-sinks-bigquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serilog.Sinks.BigQuery

Build status

Usage

Log.Logger = new LoggerConfiguration()
  ...
  .WriteTo.BigQuery("my-gcp-project-id")
  .CreateLogger();

Also with IConfiguration

Log.Logger = new LoggerConfiguration()
  ...
  .WriteTo.BigQuery(configuration.GetSection("BigQuery"))
  .CreateLogger();

appsettings.json

{
  "BigQuery": {
    "ProjectId": "my-gcp-project-id",
    "DatasetName": "mydataset"
  }
}

Log structure

The BigQuery table has the following structure.

Field name Type
Time STRING
LevelNumber INTEGER
LevelName STRING
Message STRING
Template STRING
Properties RECORD (REPEATED)
Properties. Name STRING
Properties. Value STRING
ExceptionStackTrace STRING

The properties name column could have "." for nested properties in the form of "RootProperty.ChildProperty".

Google Application Credentials

Required Roles/Permissions:

  • BigQuery Data Editor
  • BigQuery User

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages