Skip to content

Commit

Permalink
LOGCXX-400: Tried to make the code more readable by seperating blocks…
Browse files Browse the repository at this point in the history
… of texts using the already inlined 0 bytes.
  • Loading branch information
Thorsten Schöning committed Mar 17, 2016
1 parent 57deba9 commit 79133b3
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/main/cpp/locationinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,21 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const {
os.writeNull(p);
} else {
char prolog[] = {
0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E,
0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C,
0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69,
0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F,
0x6E, 0x49, 0x6E, 0x66, 0x6F, static_cast<char>(0xED), static_cast<char>(0x99), static_cast<char>(0xBB),
static_cast<char>(0xE1), 0x4A, static_cast<char>(0x91), static_cast<char>(0xA5), 0x7C, 0x02, 0x00, 0x01,
0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49,
0x6E, 0x66, 0x6F,
0x74, 0x00, 0x12, 0x4C, 0x6A,
0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67,
0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B,
0x78, 0x70 };
0x72,
0x00,
0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E,
0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F,
0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x66, 0x6F, static_cast<char>(0xED),
static_cast<char>(0x99), static_cast<char>(0xBB), static_cast<char>(0xE1),
0x4A, static_cast<char>(0x91), static_cast<char>(0xA5), 0x7C, 0x02,
0x00,
0x01, 0x4C,
0x00,
0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, 0x6E, 0x66, 0x6F, 0x74,
0x00,
0x12, 0x4C, 0x6A, 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F,
0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, 0x78, 0x70
};
os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p);
char* line = p.itoa(lineNumber);
//
Expand Down

0 comments on commit 79133b3

Please sign in to comment.