| OLD | NEW |
| 1 // Copyright (c) 2007, Google Inc. | 1 // Copyright (c) 2007, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // | 33 // |
| 34 // Author: Mark Mentovai | 34 // Author: Mark Mentovai |
| 35 | 35 |
| 36 #include <assert.h> | 36 #include <assert.h> |
| 37 #include <errno.h> | 37 #include <errno.h> |
| 38 #include <string.h> | 38 #include <string.h> |
| 39 #include <time.h> | 39 #include <time.h> |
| 40 | 40 |
| 41 #include <string> | 41 #include <string> |
| 42 | 42 |
| 43 #include "common/stdio.h" | 43 #include "common/stdio_wrapper.h" |
| 44 #include "common/using_std_string.h" | 44 #include "common/using_std_string.h" |
| 45 #include "processor/logging.h" | 45 #include "processor/logging.h" |
| 46 #include "processor/pathname_stripper.h" | 46 #include "processor/pathname_stripper.h" |
| 47 | 47 |
| 48 namespace google_breakpad { | 48 namespace google_breakpad { |
| 49 | 49 |
| 50 LogStream::LogStream(std::ostream &stream, Severity severity, | 50 LogStream::LogStream(std::ostream &stream, Severity severity, |
| 51 const char *file, int line) | 51 const char *file, int line) |
| 52 : stream_(stream) { | 52 : stream_(stream) { |
| 53 time_t clock; | 53 time_t clock; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // strerror isn't necessarily thread-safe. strerror_r would be preferrable, | 103 // strerror isn't necessarily thread-safe. strerror_r would be preferrable, |
| 104 // but GNU libc uses a nonstandard strerror_r by default, which returns a | 104 // but GNU libc uses a nonstandard strerror_r by default, which returns a |
| 105 // char* (rather than an int success indicator) and doesn't necessarily | 105 // char* (rather than an int success indicator) and doesn't necessarily |
| 106 // use the supplied buffer. | 106 // use the supplied buffer. |
| 107 error_string->assign(strerror(errno)); | 107 error_string->assign(strerror(errno)); |
| 108 return errno; | 108 return errno; |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace google_breakpad | 111 } // namespace google_breakpad |
| OLD | NEW |