|
| 1 | +package scouter.plugin.server.none; |
| 2 | + |
| 3 | +import scouter.lang.pack.*; |
| 4 | +import scouter.lang.plugin.PluginConstants; |
| 5 | +import scouter.lang.plugin.annotation.ServerPlugin; |
| 6 | + |
| 7 | +/** |
| 8 | + * @author Gun Lee ([email protected]) on 2016. 3. 19. |
| 9 | + */ |
| 10 | +public class NullPlugin { |
| 11 | + private boolean debug = System.getProperty("scouter.plugin.server.debug", "f").equals("true") ? true : false; |
| 12 | + |
| 13 | + @ServerPlugin(PluginConstants.PLUGIN_SERVER_ALERT) |
| 14 | + public void alert(AlertPack pack){ |
| 15 | + println("[NullPlugin-alert] " + pack); |
| 16 | + } |
| 17 | + |
| 18 | + @ServerPlugin(PluginConstants.PLUGIN_SERVER_COUNTER) |
| 19 | + public void counter(PerfCounterPack pack){ |
| 20 | + println("[NullPlugin-counter] " + pack); |
| 21 | + } |
| 22 | + |
| 23 | + @ServerPlugin(PluginConstants.PLUGIN_SERVER_OBJECT) |
| 24 | + public void object(ObjectPack pack){ |
| 25 | + println("[NullPlugin-object] " + pack); |
| 26 | + } |
| 27 | + |
| 28 | + @ServerPlugin(PluginConstants.PLUGIN_SERVER_PROFILE) |
| 29 | + public void profile(XLogProfilePack pack){ |
| 30 | + println("[NullPlugin-profile] " + pack); |
| 31 | + } |
| 32 | + |
| 33 | + @ServerPlugin(PluginConstants.PLUGIN_SERVER_SUMMARY) |
| 34 | + public void summary(SummaryPack pack){ |
| 35 | + println("[NullPlugin-summary] " + pack); |
| 36 | + } |
| 37 | + |
| 38 | + @ServerPlugin(PluginConstants.PLUGIN_SERVER_XLOG) |
| 39 | + public void xlog(XLogPack pack){ |
| 40 | + println("[NullPlugin-xlog] " + pack); |
| 41 | + } |
| 42 | + |
| 43 | + private void println(Object o) { |
| 44 | + debug = true; |
| 45 | + if(debug) { |
| 46 | + System.out.println(o); |
| 47 | + } |
| 48 | + } |
| 49 | +} |
0 commit comments