File: main.cpp

package info (click to toggle)
plog 1.1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,404 kB
  • sloc: cpp: 13,637; ansic: 473; sh: 24; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 519 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <Arduino.h>

#include <plog/Log.h>
#include <plog/Init.h>
#include <plog/Formatters/TxtFormatter.h>
#include <plog/Appenders/ArduinoAppender.h>

static plog::ArduinoAppender<plog::TxtFormatter> arduinoAppender(Serial);

void setup()
{
    plog::init(plog::verbose, &arduinoAppender);

    PLOG_VERBOSE << "verbose";
    PLOG_DEBUG << "debug";
    PLOG_INFO << "info";
    PLOG_WARNING << "warning";
    PLOG_ERROR << "error";
    PLOG_FATAL << "fatal";
}

void loop()
{
    delay(1000); // Wait for a second
}