When set to true, the following types are emitted as JSON numbers instead of strings,
for format parameters and scopes (including key/value pairs within compound scope objects):
public string TraceGoogleCloudProjectId { get; set; }
The ID of the Google Cloud Project where trace data is being written to Google Cloud Trace.
Optional. Set this property to enable Google Cloud Trace and Logging correlation.
This property has no effect on where log entries are written to.
It also has no effect on whether trace information is actually exported to Google Cloud Trace or to which Google Cloud Project traces are exported to.
When set, this property informs the Console Logger to include trace context information (if any) on the log entries, assuming the trace information is being stored on the specified Google Cloud Project.
Note that when running your code in Google Cloud, for instance in Google Cloud Run, trace information is automatically collected and exported by the runtime.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGoogleCloudConsoleFormatterOptions\u003c/code\u003e class provides configuration options for the \u003ccode\u003eGoogleCloudConsoleFormatter\u003c/code\u003e when used with Google Cloud Logging.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eConsoleFormatterOptions\u003c/code\u003e and includes properties such as \u003ccode\u003eIncludeScopes\u003c/code\u003e, \u003ccode\u003eTimestampFormat\u003c/code\u003e, and \u003ccode\u003eUseUtcTimestamp\u003c/code\u003e, allowing for customization of log formatting.\u003c/p\u003e\n"],["\u003cp\u003eIt offers a \u003ccode\u003eLogAugmenter\u003c/code\u003e property of type \u003ccode\u003eIGoogleCloudConsoleLogAugmenter\u003c/code\u003e, enabling the addition of custom data to log entries beyond the standard formatted output.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTraceGoogleCloudProjectId\u003c/code\u003e property, when set, allows the Console Logger to include trace context information on log entries, facilitating correlation between Google Cloud Trace and Logging data.\u003c/p\u003e\n"],["\u003cp\u003eThere are different versions of the \u003ccode\u003eGoogleCloudConsoleFormatterOptions\u003c/code\u003e class that are documented, with the latest version being 1.4.0, while versions 1.0.0, 1.1.0, 1.2.0, and 1.3.1 are also available.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Logging.Console - Class GoogleCloudConsoleFormatterOptions (1.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.Logging.Console/latest/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatterOptions)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Logging.Console/1.4.0/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatterOptions)\n- [1.3.1](/dotnet/docs/reference/Google.Cloud.Logging.Console/1.3.1/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatterOptions)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Logging.Console/1.2.0/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatterOptions)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Logging.Console/1.1.0/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatterOptions)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Logging.Console/1.0.0/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatterOptions) \n\n public class GoogleCloudConsoleFormatterOptions : ConsoleFormatterOptions\n\nReference documentation and code samples for the Google.Cloud.Logging.Console class GoogleCloudConsoleFormatterOptions.\n\nOptions for [GoogleCloudConsoleFormatter](/dotnet/docs/reference/Google.Cloud.Logging.Console/latest/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatter). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e [ConsoleFormatterOptions](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.console.consoleformatteroptions) \\\u003e GoogleCloudConsoleFormatterOptions \n\nInherited Members\n-----------------\n\n[ConsoleFormatterOptions.IncludeScopes](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.console.consoleformatteroptions.includescopes) \n[ConsoleFormatterOptions.TimestampFormat](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.console.consoleformatteroptions.timestampformat) \n[ConsoleFormatterOptions.UseUtcTimestamp](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.console.consoleformatteroptions.useutctimestamp) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Logging.Console](/dotnet/docs/reference/Google.Cloud.Logging.Console/latest/Google.Cloud.Logging.Console)\n\nAssembly\n--------\n\nGoogle.Cloud.Logging.Console.dll\n\nProperties\n----------\n\n### EmitNumericTypes\n\n public bool EmitNumericTypes { get; set; }\n\nWhen set to `true`, the following types are emitted as JSON numbers instead of strings,\nfor format parameters and scopes (including key/value pairs within compound scope objects):\n\n- [byte](https://learn.microsoft.com/dotnet/api/system.byte)\n- [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte)\n- [short](https://learn.microsoft.com/dotnet/api/system.int16)\n- [ushort](https://learn.microsoft.com/dotnet/api/system.uint16)\n- [int](https://learn.microsoft.com/dotnet/api/system.int32)\n- [uint](https://learn.microsoft.com/dotnet/api/system.uint32)\n- [float](https://learn.microsoft.com/dotnet/api/system.single) (when not infinite or not-a-number)\n- [double](https://learn.microsoft.com/dotnet/api/system.double) (when not infinite or not-a-number)\n\n\u003cbr /\u003e\n\n**Remarks** \nDefaults to `false`.\n\n### LogAugmenter\n\n public IGoogleCloudConsoleLogAugmenter LogAugmenter { get; set; }\n\nAllows augmenting formatted log entries with information not included by\n[GoogleCloudConsoleFormatter](/dotnet/docs/reference/Google.Cloud.Logging.Console/latest/Google.Cloud.Logging.Console.GoogleCloudConsoleFormatter). May be null.\nIf set, the [AugmentFormattedLogEntry\\\u003cTState\\\u003e(in LogEntry\\\u003cTState\\\u003e, IExternalScopeProvider, Utf8JsonWriter)](/dotnet/docs/reference/Google.Cloud.Logging.Console/latest/Google.Cloud.Logging.Console.IGoogleCloudConsoleLogAugmenter#Google_Cloud_Logging_Console_IGoogleCloudConsoleLogAugmenter_AugmentFormattedLogEntry__1_Microsoft_Extensions_Logging_Abstractions_LogEntry___0___Microsoft_Extensions_Logging_IExternalScopeProvider_System_Text_Json_Utf8JsonWriter_) will be called for each formatted entry.\n\n### TraceGoogleCloudProjectId\n\n public string TraceGoogleCloudProjectId { get; set; }\n\nThe ID of the Google Cloud Project where trace data is being written to Google Cloud Trace.\nOptional. Set this property to enable Google Cloud Trace and Logging correlation.\n\n**Remarks** \nThis property has no effect on where log entries are written to.\nIt also has no effect on whether trace information is actually exported to Google Cloud Trace or to which Google Cloud Project traces are exported to.\nWhen set, this property informs the Console Logger to include trace context information (if any) on the log entries, assuming the trace information is being stored on the specified Google Cloud Project.\nNote that when running your code in Google Cloud, for instance in Google Cloud Run, trace information is automatically collected and exported by the runtime."]]