Skip to content

out_android_callback skips src location #33

Description

@alicefrary

out_android_callback ends with the line

__android_log_print(android_lvl(msg->lvl), tag, "%s", msg->msg_b);

When logging src locations, the buffer and relevant pointers in msg look something like this:

tag_b          msg_b
  |              |
  [TAG] [SRCLOC] [MESSAGE]
      |
    tag_e

tag is just the char* from tag_b to tag_e, so the src location doesn't get passed to __android_log_print.


A potential fix might be to add a char *src_b field to the zf_log_message struct, and have the callback use

__android_log_print(android_lvl(msg->lvl), tag, "%s", msg->src_b);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions