Skip to content

Commit

Permalink
Shell|libshell: Updated logging with domain-specific LOG macros
Browse files Browse the repository at this point in the history
Also, tweaked the entry levels to be more suitable within the domain.
  • Loading branch information
skyjake committed Jan 4, 2014
1 parent ce7572f commit 29c5625
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions doomsday/libshell/src/abstractlink.cpp
Expand Up @@ -193,11 +193,11 @@ void AbstractLink::socketDisconnected()
{
if(!d->peerAddress.isNull())
{
LOG_INFO("Disconnected from %s") << d->peerAddress;
LOG_NET_NOTE("Disconnected from %s") << d->peerAddress;
}
else
{
LOG_INFO("Disconnected");
LOG_NET_NOTE("Disconnected");
}
}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/localserver.cpp
Expand Up @@ -136,7 +136,7 @@ void LocalServer::start(duint16 port, String const &gameMode, QStringList additi

foreach(String opt, additionalOptions) cmd.append(opt);

LOG_INFO("Starting local server with port %i using game mode '%s'")
LOG_NET_NOTE("Starting local server with port %i using game mode '%s'")
<< port << gameMode;

cmd.execute();
Expand Down
2 changes: 1 addition & 1 deletion doomsday/server/src/remoteuser.cpp
Expand Up @@ -81,7 +81,7 @@ DENG2_PIMPL(RemoteUser)
{
if(state == Disconnected) return;

LOG_INFO("Closing connection to remote user %s (from %s)") << id << address;
LOG_NET_NOTE("Closing connection to remote user %s (from %s)") << id << address;
DENG2_ASSERT(socket->isOpen());

if(state == Joined)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/server/src/server/sv_main.cpp
Expand Up @@ -581,7 +581,7 @@ void Sv_GetPackets(void)
boolean Sv_PlayerArrives(unsigned int nodeID, char const *name)
{
LOG_AS("Sv_PlayerArrives");
LOG_INFO("'%s' has arrived.") << name;
LOG_NET_NOTE("'%s' has arrived") << name;

// We need to find the new player a client entry.
for(int i = 1; i < DDMAXPLAYERS; ++i)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/server/src/serversystem.cpp
Expand Up @@ -83,7 +83,7 @@ DENG2_PIMPL(ServerSystem)
{
// Note: re-initialization is allowed, so we don't check for inited now.

LOG_INFO("Server listening on TCP port ") << port;
LOG_NET_NOTE("Server listening on TCP port %i") << port;

deinit();

Expand Down
4 changes: 2 additions & 2 deletions doomsday/server/src/shellusers.cpp
Expand Up @@ -61,7 +61,7 @@ ShellUsers::~ShellUsers()

void ShellUsers::add(ShellUser *user)
{
LOG_INFO("New shell user from %s") << user->address();
LOG_NET_NOTE("New shell user from %s") << user->address();

d->users.insert(user);
connect(user, SIGNAL(disconnected()), this, SLOT(userDisconnected()));
Expand Down Expand Up @@ -101,7 +101,7 @@ void ShellUsers::userDisconnected()
ShellUser *user = static_cast<ShellUser *>(sender());
d->users.remove(user);

LOG_INFO("Shell user from %s has disconnected") << user->address();
LOG_NET_NOTE("Shell user from %s has disconnected") << user->address();

user->deleteLater();
}
2 changes: 1 addition & 1 deletion doomsday/tools/shell/shell-gui/src/linkwindow.cpp
Expand Up @@ -482,7 +482,7 @@ void LinkWindow::sendCommandToServer(de::String command)
if(d->link)
{
// Echo the command locally.
LogEntry *e = new LogEntry(LogEntry::Important, "", 0, ">",
LogEntry *e = new LogEntry(LogEntry::Note, "", 0, ">",
LogEntry::Args() << new LogEntry::Arg(command));
d->logBuffer.add(e);

Expand Down
8 changes: 4 additions & 4 deletions doomsday/tools/shell/shell-text/src/shellapp.cpp
Expand Up @@ -167,7 +167,7 @@ void ShellApp::openConnection(String const &address)
LogBuffer::appBuffer().flush();
d->log->clear();

LOG_INFO("Opening connection to %s") << address;
LOG_NET_NOTE("Opening connection to %s") << address;

// Keep trying to connect to 30 seconds.
d->link = new Link(address, 30);
Expand All @@ -186,7 +186,7 @@ void ShellApp::closeConnection()
{
if(d->link)
{
LOG_INFO("Closing existing connection to %s") << d->link->address();
LOG_NET_NOTE("Closing existing connection to %s") << d->link->address();

// Get rid of the old connection.
disconnect(d->link, SIGNAL(packetsReady()), this, SLOT(handleIncomingPackets()));
Expand Down Expand Up @@ -277,7 +277,7 @@ void ShellApp::connectToFoundServer()
{
String label = d->menu->itemAction(d->menu->cursor()).label();

LOG_INFO("Selected: ") << label;
LOG_NOTE("Selected: ") << label;

openConnection(label.left(label.indexOf('(') - 1));
}
Expand All @@ -286,7 +286,7 @@ void ShellApp::sendCommandToServer(String command)
{
if(d->link)
{
LOG_INFO(">") << command;
LOG_NOTE(">") << command;

QScopedPointer<Packet> packet(d->link->protocol().newCommand(command));
*d->link << *packet;
Expand Down

0 comments on commit 29c5625

Please sign in to comment.