2019-05-24 10:29:10 +02:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<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>
|
2019-07-02 09:38:19 +02:00
|
|
|
<script src="../dist/iwmlib.js"></script>
|
2019-05-24 10:29:10 +02:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body id="page" onload="Doctest.run()">
|
|
|
|
<h1>
|
|
|
|
Logging
|
|
|
|
</h1>
|
2019-07-02 09:38:19 +02:00
|
|
|
<p>Store informations of your app permanently or use app specific logging functions.</p>
|
2019-05-24 10:29:10 +02:00
|
|
|
<script class="doctest">
|
|
|
|
Logging.log('app started')
|
2019-07-02 09:38:19 +02:00
|
|
|
Logging.warn("shouldn't happen")
|
|
|
|
Logging.error('restart')
|
|
|
|
|
|
|
|
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")
|
2019-05-24 10:29:10 +02:00
|
|
|
</script>
|
|
|
|
</body>
|