| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
package org.apache.camel.component.irc; |
| 18 |
|
|
| 19 |
|
import org.apache.commons.logging.Log; |
| 20 |
|
import org.schwering.irc.lib.IRCEventAdapter; |
| 21 |
|
import org.schwering.irc.lib.IRCModeParser; |
| 22 |
|
import org.schwering.irc.lib.IRCUser; |
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
public class IrcErrorLogger extends IRCEventAdapter { |
| 30 |
|
private Log log; |
| 31 |
|
|
| 32 |
0 |
public IrcErrorLogger(Log log) { |
| 33 |
0 |
this.log = log; |
| 34 |
0 |
} |
| 35 |
|
|
| 36 |
|
@Override |
| 37 |
|
public void onRegistered() { |
| 38 |
0 |
super.onRegistered(); |
| 39 |
0 |
log.info("onRegistered"); |
| 40 |
0 |
} |
| 41 |
|
|
| 42 |
|
@Override |
| 43 |
|
public void onDisconnected() { |
| 44 |
0 |
super.onDisconnected(); |
| 45 |
0 |
log.info("onDisconnected"); |
| 46 |
0 |
} |
| 47 |
|
|
| 48 |
|
@Override |
| 49 |
|
public void onMode(String string, IRCUser ircUser, IRCModeParser ircModeParser) { |
| 50 |
0 |
super.onMode(string, ircUser, ircModeParser); |
| 51 |
0 |
log.info("onMode.string = " + string); |
| 52 |
0 |
log.info("onMode.ircUser = " + ircUser); |
| 53 |
0 |
log.info("onMode.ircModeParser = " + ircModeParser); |
| 54 |
0 |
} |
| 55 |
|
|
| 56 |
|
@Override |
| 57 |
|
public void onMode(IRCUser ircUser, String string, String string1) { |
| 58 |
0 |
super.onMode(ircUser, string, string1); |
| 59 |
0 |
log.info("onMode.ircUser = " + ircUser); |
| 60 |
0 |
log.info("onMode.string = " + string); |
| 61 |
0 |
log.info("onMode.string1 = " + string1); |
| 62 |
0 |
} |
| 63 |
|
|
| 64 |
|
@Override |
| 65 |
|
public void onPing(String string) { |
| 66 |
0 |
super.onPing(string); |
| 67 |
0 |
log.info("onPing.string = " + string); |
| 68 |
0 |
} |
| 69 |
|
|
| 70 |
|
@Override |
| 71 |
|
public void onError(String string) { |
| 72 |
0 |
log.info("onError.string = " + string); |
| 73 |
0 |
} |
| 74 |
|
|
| 75 |
|
@Override |
| 76 |
|
public void onError(int i, String string) { |
| 77 |
0 |
super.onError(i, string); |
| 78 |
0 |
log.error("onError.i = " + i); |
| 79 |
0 |
log.error("onError.string = " + string); |
| 80 |
0 |
} |
| 81 |
|
|
| 82 |
|
@Override |
| 83 |
|
public void unknown(String string, String string1, String string2, String string3) { |
| 84 |
0 |
super.unknown(string, string1, string2, string3); |
| 85 |
0 |
log.error("unknown.string = " + string); |
| 86 |
0 |
log.error("unknown.string1 = " + string1); |
| 87 |
0 |
log.error("unknown.string2 = " + string2); |
| 88 |
0 |
log.error("unknown.string3 = " + string3); |
| 89 |
0 |
} |
| 90 |
|
} |