Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed indentation.
  • Loading branch information
Klaim committed Nov 15, 2012
commit 5bd2f7b814afc3824c17900e2003dfeb25cb9a32
8 changes: 4 additions & 4 deletions include/network/logging/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ class log_record
// Implicit construction from anything serializable to text.
template< typename TypeOfSomething >
log_record( TypeOfSomething&& message )
: m_filename( "unknown" )
, m_line(0)
: m_filename( "unknown" )
, m_line(0)
{
write( std::forward<TypeOfSomething>(message) );
}

// Construction with recording context informations.
log_record( std::string filename, unsigned long line )
: m_filename( filename )
, m_line( line )
: m_filename( filename )
, m_line( line )
{
}

Expand Down
6 changes: 3 additions & 3 deletions libs/network/src/logging/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace handler
namespace
{
void std_log_handler( const log_record& log )
{
{
std::cerr << "[network " << log.filename() << ":" << log.line() << "] "
<< log.message() << std::endl;
<< log.message() << std::endl;
}
}

Expand All @@ -47,7 +47,7 @@ void log( const log_record& log )
auto log_handler = current_log_record_handler;
if( log_handler )
{
(*log_handler)( log );
(*log_handler)( log );
}
}

Expand Down