简体   繁体   中英

Blackbird logger - absolutely nothing happens

This should be so simple...

I thought it would be nice to try the Blackbird logger ( Blackbird home page )

Following the guide on the authors page, I created a directory on the server and loaded blackbird.js, blackbird.css, the two blackbird image files and a .html file containing the following into the directory. When I access the page, the alert fires but absolutely nothing else happens. The blackbird .js and .css files are loading and visible in a debugger. Where have I gone wrong? (same result on Firefox, Chrome and IE).

<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Blackbird test</title>
    <link rel="Stylesheet" type="text/css" href="blackbird.css" />
    <script type="text/javascript" src="blackbird.js"></script>
    <script type="text/javascript">
        function func1() {
            alert("In function, about to send log messages");
            log.debug("hello");
            log.debug( 'this is a debug message' );
            log.info( 'this is an info message' );
            log.warn( 'this is a warning message' );
            log.error( 'this is an error message' );
        }
    </script>
</head>
<body>
<input type="button" value="click me" onclick="func1();"/>
</body>
</html>

The problem is that you need to explicitly tell blackbird to appear:

function func1() {
    log.toggle(); // Show it
    // rest of your code here;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM