Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcn_log cannot be split in multiple lines #1

Closed
acloudiator opened this issue Dec 17, 2018 · 0 comments
Closed

pcn_log cannot be split in multiple lines #1

acloudiator opened this issue Dec 17, 2018 · 0 comments

Comments

@acloudiator
Copy link
Contributor

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

sebymiano added a commit to sebymiano/polycube that referenced this issue Feb 1, 2019
This commit fixes a "bug" in the pcn_log function
that did not allow to split the pcn_log body into multiple
lines.
It uses an improved regex function to check the end of the
pcn_log function and replace it with the correct version so that
compilation errors can be avoided.

Fixes: polycube-network#1 (pcn_log cannot be split in multiple lines)
Signed-off-by: Sebastiano Miano <mianosebastiano@gmail.com>
mauriciovasquezbernal pushed a commit that referenced this issue Feb 4, 2019
This commit fixes a "bug" in the pcn_log function that did not allow
to split the pcn_log body into multiple lines, for example by putting
the text and the parameters in different lines.
It uses an improved regex function to check the end of the
pcn_log function and replace it with the correct version so that
compilation errors can be avoided.

Fixes: #1 (pcn_log cannot be split in multiple lines)
Signed-off-by: Sebastiano Miano <mianosebastiano@gmail.com>
sebymiano added a commit to sebymiano/polycube that referenced this issue Feb 5, 2019
This commit fixes a "bug" in the pcn_log function that did not allow
to split the pcn_log body into multiple lines, for example by putting
the text and the parameters in different lines.
It uses an improved regex function to check the end of the
pcn_log function and replace it with the correct version so that
compilation errors can be avoided.

Fixes: polycube-network#1 (pcn_log cannot be split in multiple lines)
Signed-off-by: Sebastiano Miano <mianosebastiano@gmail.com>
mauriciovasquezbernal pushed a commit to sebymiano/polycube that referenced this issue Feb 6, 2019
This commit fixes a "bug" in the pcn_log function that did not allow
to split the pcn_log body into multiple lines, for example by putting
the text and the parameters in different lines.
It uses an improved regex function to check the end of the
pcn_log function and replace it with the correct version so that
compilation errors can be avoided.

Fixes: polycube-network#1 (pcn_log cannot be split in multiple lines)
Signed-off-by: Sebastiano Miano <mianosebastiano@gmail.com>
mauriciovasquezbernal pushed a commit to sebymiano/polycube that referenced this issue Feb 6, 2019
This commit fixes a "bug" in the pcn_log function that did not allow
to split the pcn_log body into multiple lines, for example by putting
the text and the parameters in different lines.
It uses an improved regex function to check the end of the
pcn_log function and replace it with the correct version so that
compilation errors can be avoided.

Fixes: polycube-network#1 (pcn_log cannot be split in multiple lines)
Signed-off-by: Sebastiano Miano <mianosebastiano@gmail.com>
mauriciovasquezbernal pushed a commit that referenced this issue Feb 20, 2019
This commit fixes a "bug" in the pcn_log function that did not allow
to split the pcn_log body into multiple lines, for example by putting
the text and the parameters in different lines.
It uses an improved regex function to check the end of the
pcn_log function and replace it with the correct version so that
compilation errors can be avoided.

Fixes: #1 (pcn_log cannot be split in multiple lines)
Signed-off-by: Sebastiano Miano <mianosebastiano@gmail.com>
This was referenced Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants