Skip to content

pcn_log cannot be split in multiple lines #1

@acloudiator

Description

@acloudiator

Mauricio identified a weird limitation that can cause many troubles to developers.

pcn_log is not a function nor a macro, it is just a string that is looked and replaced in the code using a set of regular expressions (DatapathLog::parse_log)[1]. Currently, those regex are only able to replace pcn_log correctly if this is in a single line, otherwise strange compilation errors happen.

This limitation is because this is not possible to use a map inside a macro with bcc, unfortunately, I haven't been able to look a solution for it.

https://github.com/polycube-network/polycube/blob/master/src/polycubed/src/datapath_log.cpp#L211

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions