Skip to main content

Logging

Send log messages to Fullstory without logging to the developer console

Parameters
    logLevel string required

    Possible values: 'Log', 'Debug', 'Info', 'Warn', 'Error', 'Assert'

    If running on Android, most of these values map to corresponding android log levels (with 'Assert' clamping to 'Error' on Android). If running on iOS, most of these values are identical to the methods available to the browser console API, with 'Log' clamping to 'Debug' on iOS.

    message string required

    A text string that will be logged to the Fullstory console.

The log levels result in different output styles in the Fullstory console.

Additional Information

FullStory.log(logLevel, message);

Messages logged to Fullstory will appear in the Fullstory console.

Example Invocation

Logging a message at the Log level

FullStory.log(FullStory.LogLevel.Log, 'Customer logged in successfully');

Logging a message at the Debug level

FullStory.log(FullStory.LogLevel.Debug, 'Login debug info');

Logging a message at the Info level

FullStory.log(FullStory.LogLevel.Info, 'Login info');

Logging a message at the Warn level

FullStory.log(FullStory.LogLevel.Warn, 'Login warned!');

Logging a message at the Error level

FullStory.log(FullStory.LogLevel.Error, 'Login failed');

Logging a message at the Assert level

FullStory.log(FullStory.LogLevel.Assert, 'Login failed!');