Class NullLogger
Defined in File NullObjects.hpp
Inheritance Relationships
Base Type
public Microsoft::Applications::Events::ILogger(Class ILogger)
Class Documentation
-
class Microsoft::Applications::Events::NullLogger : public Microsoft::Applications::Events::ILogger
Public Functions
-
inline virtual ISemanticContext *GetSemanticContext() const override
Gets an ISemanticContext interface through which you can specify the semantic context for this logger instance.
- Returns
An instance of the ISemanticContext interface.
-
inline virtual void SetContext(const std::string&, const char[], PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a constant pointer to a character array that contains the property’s string value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A constant pointer to a character array that contains the property’s string value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, const std::string&, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a string that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A string that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, double, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a double that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A double that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, int8_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, an int8_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – An int8_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, int16_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, an int16_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – An int16_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, int32_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, an int32_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – An int32_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, int64_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, an int64_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – An int64_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, uint8_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a uint8_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A uint8_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, uint16_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a uint16_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A uint16_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, uint32_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a uint32_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A uint32_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, uint64_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a uint64_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A uint64_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, bool, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a boolean that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A boolean that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, time_ticks_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a .NET time_ticks_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A .NET time_ticks_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, GUID_t, PiiKind = PiiKind_None) override
Adds (or overrides) a property of the context associated with this logger instance, taking a string that contains the name of the context, a GUID_t that contains the property value, and tags the property with its PiiKind (Personal Identifiable Information kind).
- Parameters
name – A string that contains the name of the property.
value – A GUID_t that contains the property value.
piiKind – One of the ::PiiKind enumeration values. If you don’t specify a value, then the default PiiKind_None is used.
-
inline virtual void SetContext(const std::string&, const EventProperty&) override
Populate event property using EventProperty value object.
- Parameters
name – Property name.
prop – Property value object.
-
inline virtual void LogAppLifecycle(AppLifecycleState, EventProperties const&) override
Logs the state of the application lifecycle.
- Parameters
state – The state in the application’s lifecycle, specified by one of the ::AppLifecycleState enumeration values.
properties – Properties of this AppLifecycle event, specified using an EventProperties object.
-
inline virtual void LogSession(SessionState, const EventProperties&) override
Logs the state of the application session.
- Parameters
state – The state in the application’s lifecycle, as one of the SessionState enumeration values.
properties – Properties of this session event, specified using an EventProperties object.
-
inline virtual void LogEvent(std::string const&) override
Logs the custom event with the specified name.
- Parameters
name – A string that contains the name of the custom event.
-
inline virtual void LogEvent(EventProperties const&) override
Logs a custom event with the specified name and properties.
- Parameters
properties – Properties of this custom event, specified using an EventProperties object.
-
inline virtual void LogFailure(std::string const&, std::string const&, EventProperties const&) override
Logs a failure event - such as an application exception.
- Parameters
signature – A string that contains the signature that identifies the bucket of the failure.
detail – A string that contains a description of the failure.
properties – Properties of this failure event, specified using an EventProperties object.
-
inline virtual void LogFailure(std::string const&, std::string const&, std::string const&, std::string const&, EventProperties const&) override
Logs a failure event - such as an application exception.
- Parameters
signature – A string that contains the signature that identifies the bucket of the failure.
detail – A string that contains a description of the failure.
category – A string that contains the category of the failure - such as an application error, application not responding, or application crash
id – A string that contains the identifier that uniquely identifies this failure.
properties – Properties of this failure event, specified using an EventProperties object.
-
inline virtual void LogPageView(std::string const&, std::string const&, EventProperties const&) override
Logs a page view event, taking a string that contains the event identifier, a string that contains a friendly name for the page, and properties of the event.
Note: A page view event is normally the result of a user action on a UI page such as a search query, a content request, or a page navigation.
- Parameters
id – A string that contains an identifier that uniquely identifies this page.
pageName – A string that contains the friendly name of the page.
properties – Properties of this page view event, specified using an EventProperties object.
-
inline virtual void LogPageView(std::string const&, std::string const&, std::string const&, std::string const&, std::string const&, EventProperties const&) override
Logs a page view event, taking a string that contains the event identifier, a string that contains a friendly name for the page, a string that contains the page category, a string that contains the page’s URI, a string that contains the referring page’s URI, and properties of the event.
Note: A page view event is normally the result of a user action on a UI page such as a search query, a content request, or a page navigation.
- Parameters
id – A string that contains the identifier that uniquely identifies this page.
pageName – A string that contains the friendly name of the page.
category – A string that contains the category to which this page belongs.
uri – A string that contains the URI of this page.
referrerUri – A string that contains the URI of the page that refers to this page.
properties – Properties of this page view event, specified using an EventProperties object.
-
inline virtual void LogPageAction(std::string const&, ActionType, EventProperties const&) override
Logs a page action event, taking a string that contains the page view identifier, the action type, and the action event properties.
- Parameters
pageViewId – A string that contains an identifier that uniquely identifies the page view.
actionType – The generic type of the page action, specified as one of the ::ActionType enumeration values.
properties – Properties of this page action event, specified using an EventProperties object.
-
inline virtual void LogPageAction(PageActionData const&, EventProperties const&) override
Logs a detailed page action event, taking a reference to the page action data, and the action event properties.
- Parameters
pageActionData – Detailed information about the page action, contained in a PageActionData object.
properties – Properties of this page action event, contained in an EventProperties object.
-
inline virtual void LogSampledMetric(std::string const&, double, std::string const&, EventProperties const&) override
Logs a sampled metric event - such as a performance counter, taking a name for the sampled metric, a double that contains the value of the sampled metric, a string that contains the units of measure of the sampled metric, and a reference to an EventProperties object to hold the values.
- Parameters
name – A string that contains the name of the sampled metric.
value – A double that holds the value of the sampled metric.
units – A string that contains the units of the metric value.
properties – Properties of this sampled metric event, specified using an EventProperties object.
-
inline virtual void LogSampledMetric(std::string const&, double, std::string const&, std::string const&, std::string const&, std::string const&, EventProperties const&) override
Logs a sampled metric event - such as a performance counter, taking a name for the sampled metric, a double that contains the value of the sampled metric, a string that contains the units of measure of the sampled metric, a string that contains the name of the metric instance, a string that contains the name of the object class, a string that contains the object identifier, and a reference to an EventProperties object to hold the values.
- Parameters
name – A string that contains the name of the sampled metric.
value – A double that contains the value of the sampled metric.
units – A string that contains the units of the metric value.
instanceName – A string that contains the name of this metric instance. E.g., performance counter.
objectClass – A string that contains the object class for which this metric tracks.
objectId – A string that contains the object identifier for which this metric tracks.
properties – Properties of this sampled metric event, specified using an EventProperties object.
-
inline virtual void LogAggregatedMetric(std::string const&, long, long, EventProperties const&) override
Logs a precomputed aggregated metric event.
For example, queue length.
- Parameters
name – A string that contains the name of the aggregated metric.
duration – A long that contains the duration (in microseconds) over which this metric is aggregated.
count – A long that contains the count of the aggregated metric observations.
properties – Properties of this aggregated metric event, specified using an EventProperties object.
-
inline virtual void LogAggregatedMetric(AggregatedMetricData const&, EventProperties const&) override
Logs a precomputed aggregated metrics event, taking a reference to an AggregatedMetricData object, and a reference to a EventProperties object.
- Parameters
metricData – Detailed information about the aggregated metric, contained in an AggregatedMetricData object.
properties – Properties of this aggregated metric event, specified in an EventProperties object.
-
inline virtual void LogTrace(TraceLevel, std::string const&, EventProperties const&) override
Logs a trace event for troubleshooting.
- Parameters
level – Level of the trace, as one of the TraceLevel enumeration values.
message – A string that contains the a description of the trace.
properties – Properties of this trace event, specified using an EventProperties object.
-
inline virtual void LogUserState(UserState, long, EventProperties const&) override
Logs a user’s state.
- Parameters
state – The user’s reported state, specified using one of the ::UserState enumeration values.
timeToLiveInMillis – A long that contains the duration (in milliseconds) for which the state reported is valid.
properties – Properties of this user state event, specified using an EventProperties object.
-
inline virtual IEventFilterCollection &GetEventFilters() noexcept override
Get collection of current event filters.
-
inline virtual IEventFilterCollection const &GetEventFilters() const noexcept override
Get collection of current event filters.
-
inline virtual void SetParentContext(ISemanticContext*) override
Allows the logger to inherit the alternate parent context.
Default context wiring rules:
host loggers inherit their common host LogManager context.
guest loggers do not inherit their host LogManager context due to privacy reasons.
- Parameters
context – The context.
-
inline virtual void SetLevel(uint8_t) override
Set default diagnostic level of this logger instance.
- Parameters
level – Diagnostic level.
-
inline virtual ISemanticContext *GetSemanticContext() const override