1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

villas-fpga-ctrl: return to old loggers

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2024-02-07 15:16:36 +01:00 committed by Niklas Eiling
parent 6e1783612d
commit a0fc73f2ee

View file

@ -141,17 +141,18 @@ void readFromDmaToStdOut(
int cnt = 0;
while (true) {
SPDLOG_TRACE("Read from stream and write to address {}:{:#x}",
block[next]->getAddrSpaceId(), block[next]->getOffset());
logger->trace("Read from stream and write to address {}:{:#x}",
block[next]->getAddrSpaceId(), block[next]->getOffset());
// We could use the number of interrupts to determine if we missed a chunk of data
dma->read(*block[next], block[next]->getSize());
auto c = dma->readComplete();
if (c.interrupts > 1) {
SPDLOG_WARN("Missed {} interrupts", c.interrupts - 1);
logger->warn("Missed {} interrupts", c.interrupts - 1);
}
SPDLOG_TRACE("bytes: {}, intrs: {}, bds: {}", c.bytes, c.interrupts, c.bds);
logger->trace("bytes: {}, intrs: {}, bds: {}", c.bytes, c.interrupts,
c.bds);
try {
for (size_t i = 0; i * 4 < c.bytes; i++) {
int32_t ival = mem[cur][i];
@ -165,7 +166,7 @@ void readFromDmaToStdOut(
}
formatter->output(std::cout);
} catch (const std::exception &e) {
SPDLOG_WARN("Failed to output data: {}", e.what());
logger->warn("Failed to output data: {}", e.what());
}
cur = next;
@ -204,6 +205,7 @@ int main(int argc, char *argv[]) {
// Logging setup
logging.setLevel(spdlog::level::trace);
logger->set_level(spdlog::level::trace);
fpga::setupColorHandling();
if (configFile.empty()) {