elmah.io.javascript
3.7.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package elmah.io.javascript --version 3.7.0
NuGet\Install-Package elmah.io.javascript -Version 3.7.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="elmah.io.javascript" Version="3.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add elmah.io.javascript --version 3.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: elmah.io.javascript, 3.7.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install elmah.io.javascript as a Cake Addin #addin nuget:?package=elmah.io.javascript&version=3.7.0 // Install elmah.io.javascript as a Cake Tool #tool nuget:?package=elmah.io.javascript&version=3.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
elmah.io.javascript
For the most recent documentation, visit Logging to elmah.io from JavaScript.
Initialization
Immediately-Invoked Function Expression (IIFE)
<script src="elmahio.js?apiKey=YOUR-API-KEY&logId=YOUR-LOG-ID" type="text/javascript"></script>
UMD Constructor with options
<script src="elmahio.js" type="text/javascript"></script>
<script type="text/javascript">
var log = new Elmahio({
apiKey: 'YOUR-API-KEY',
logId: 'YOUR-LOG-ID',
});
</script>
Default options
new Elmahio({
apiKey: null,
logId: null,
debug: false,
application: null,
filter: null,
captureConsoleMinimumLevel: 'none',
breadcrumbs: false,
breadcrumbsNumber: 10
});
Manual logging
Works only with UMD Constructor !
var log = new Elmahio({
apiKey: 'YOUR-API-KEY',
logId: 'YOUR-LOG-ID',
});
log.verbose(msg);
log.verbose(msg, error);
log.debug(msg);
log.debug(msg, error);
log.information(msg);
log.information(msg, error);
log.warning(msg);
log.warning(msg, error);
log.error(msg);
log.error(msg, error);
log.fatal(msg);
log.fatal(msg, error);
Where msg is a text string and error is a JavaScript Error Object.
Manual logging using console logging
Works only with UMD Constructor ! console.log() is not available for logging !
var log = new Elmahio({
apiKey: 'YOUR-API-KEY',
logId: 'YOUR-LOG-ID',
captureConsoleMinimumLevel: 'debug' // options available: 'none', 'debug', 'info', 'warn', 'error'
});
// captureConsoleMinimumLevel: 'none' will disable logging from console;
// captureConsoleMinimumLevel: 'debug' will enable all of them - console.debug, console.info, console.warn, console.error;
// captureConsoleMinimumLevel: 'info' will enable - console.info, console.warn, console.error;
// captureConsoleMinimumLevel: 'warn' will enable - console.warn, console.error;
// captureConsoleMinimumLevel: 'error' will enable - console.error.
console.error('This is an %s message.', 'error');
console.warn('This is a %s message.', 'warning');
console.info('This is an %s message.', 'information');
console.debug('This is a %s message.', 'debug');
Acknowledgments
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
4.1.1 | 99 | 8/2/2024 | |
4.1.0 | 1,380 | 11/28/2023 | |
4.0.0 | 193 | 7/24/2023 | |
3.7.1 | 480 | 8/29/2022 | |
3.7.0 | 476 | 2/22/2022 | |
3.6.0 | 457 | 1/14/2022 | |
3.5.2 | 369 | 8/10/2021 | |
3.5.1 | 364 | 6/15/2021 | |
3.5.0 | 327 | 6/3/2021 | |
3.4.1 | 381 | 2/20/2021 | |
3.4.0 | 316 | 2/17/2021 | |
3.3.1 | 423 | 9/3/2020 | |
3.3.0 | 426 | 8/17/2020 | |
3.2.0 | 473 | 6/25/2020 | |
3.1.3 | 462 | 2/12/2020 | |
3.1.1 | 494 | 11/20/2019 | |
3.0.3 | 685 | 8/17/2019 | |
3.0.0 | 768 | 12/18/2018 |