2023-05-09 13:25:39 +02:00
|
|
|
<!DOCTYPE html>
|
2019-05-24 10:29:10 +02:00
|
|
|
<html lang="en">
|
2023-05-09 13:25:39 +02:00
|
|
|
<head>
|
|
|
|
<title>Logging Doctest</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<link rel="stylesheet" href="./3rdparty/highlight/styles/default.css" />
|
|
|
|
<link rel="stylesheet" href="../css/doctest.css" />
|
|
|
|
<script src="./3rdparty/highlight/highlight.pack.js"></script>
|
|
|
|
<script src="../dist/iwmlib.3rdparty.js"></script>
|
|
|
|
<script src="../dist/iwmlib.js"></script>
|
|
|
|
</head>
|
2019-05-24 10:29:10 +02:00
|
|
|
|
2023-05-09 13:25:39 +02:00
|
|
|
<body id="page" onload="Doctest.run()">
|
|
|
|
<h1><a href="index.html">lib.</a>Logging</h1>
|
|
|
|
<p>Store informations of your app permanently or use app specific logging functions.</p>
|
|
|
|
<script class="doctest">
|
|
|
|
Logging.log('app started')
|
|
|
|
Logging.warn("shouldn't happen")
|
|
|
|
Logging.error('restart')
|
2019-05-24 10:29:10 +02:00
|
|
|
|
2023-05-09 13:25:39 +02:00
|
|
|
Logging.setup({ log: (message) => console.log('app specific' + message) })
|
|
|
|
Logging.log('now app related')
|
|
|
|
</script>
|
|
|
|
<p>You can overwrite the log, warn, and error handler by using Logging.setup with app specific functions.</p>
|
|
|
|
<script class="doctest">
|
|
|
|
Logging.setup({ log: (message) => console.log('app specific' + message) })
|
|
|
|
Logging.log('now app related')
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|