MCPcopy Index your code
hub / github.com/dianping/cat / getCurrentMessageId

Method getCurrentMessageId

lib/java/src/main/java/com/dianping/cat/Cat.java:150–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 public static String getCurrentMessageId() {
151 if (isEnabled()) {
152 try {
153 MessageTree tree = Cat.getManager().getThreadLocalMessageTree();
154
155 if (tree != null) {
156 String messageId = tree.getMessageId();
157
158 if (messageId == null) {
159 messageId = Cat.getProducer().createMessageId();
160 tree.setMessageId(messageId);
161 }
162 return messageId;
163 } else {
164 return null;
165 }
166 } catch (Exception e) {
167 errorHandler(e);
168 return NullMessageProducer.NULL_MESSAGE_PRODUCER.createMessageId();
169 }
170 } else {
171 return NullMessageProducer.NULL_MESSAGE_PRODUCER.createMessageId();
172 }
173 }
174
175 private static String getCustomDomain() {
176 String config = System.getProperty(Cat.CLIENT_CONFIG);

Callers 2

handleMethod · 0.95
logCatMessageIdMethod · 0.95

Calls 8

isEnabledMethod · 0.95
getManagerMethod · 0.95
getMessageIdMethod · 0.95
getProducerMethod · 0.95
setMessageIdMethod · 0.95
errorHandlerMethod · 0.95
createMessageIdMethod · 0.65

Tested by

no test coverage detected