@@ -284,6 +284,136 @@ Depending on the type of the return value of the evaluation this middleware may
284
284
" var-name" " The var name" }
285
285
:returns {" status" " \" done\" " }}}}))
286
286
287
+ (def-wrapper wrap-log cider.nrepl.middleware.log /handle-log
288
+ {:doc " Middleware that captures log events and makes them inspect-able."
289
+ :requires #{#'session #'wrap-print}
290
+ :handles
291
+ {" cider/log-add-appender"
292
+ {:doc " Add an appender to a log framework."
293
+ :requires {" framework" " The id of the log framework."
294
+ " appender" " The name of the appender."
295
+ " filters" " A map from filter name to filter condition."
296
+ " size" " The number of events the appender keeps in memory."
297
+ " threshold" " The threshold in percent used to cleanup events." }
298
+ :optional {" logger" " The name of the logger to attach to." }
299
+ :returns {" status" " done"
300
+ " cider/log-add-appender" " The appender that was added." }}
301
+
302
+ " cider/log-add-consumer"
303
+ {:doc " Add a consumer to an appender of a log framework."
304
+ :requires {" framework" " The id of the log framework."
305
+ " appender" " The name of the appender."
306
+ " filters" " A map from filter name to filter condition." }
307
+ :returns {" status" " done"
308
+ " cider/log-add-consumer" " The consumer that was added." }}
309
+
310
+ " cider/log-analyze-stacktrace"
311
+ {:doc " Analyze the stacktrace of a log event."
312
+ :requires {" framework" " The id of the log framework."
313
+ " appender" " The name of the appender."
314
+ " event" " The id of the event to inspect." }
315
+ :returns {" status" " done" }}
316
+
317
+ " cider/log-clear-appender"
318
+ {:doc " Clear all events of a log appender."
319
+ :requires {" framework" " The id of the log framework."
320
+ " appender" " The name of the appender." }
321
+ :returns {" status" " done"
322
+ " cider/log-clear-appender" " The appender that was cleared." }}
323
+
324
+ " cider/log-exceptions"
325
+ {:doc " Return the exceptions and their frequencies for the given framework and appender."
326
+ :requires {" framework" " The id of the log framework."
327
+ " appender" " The name of the appender." }
328
+ :returns {" status" " done"
329
+ " cider/log-exceptions" " A map from exception name to event frequency." }}
330
+
331
+ " cider/log-frameworks"
332
+ {:doc " Return the available log frameworks."
333
+ :returns {" status" " done"
334
+ " cider/log-frameworks" " A list of log frameworks." }}
335
+
336
+ " cider/log-format-event"
337
+ {:doc " Format a log event."
338
+ :requires {" framework" " The id of the log framework."
339
+ " appender" " The name of the log appender."
340
+ " event" " The id of the log event." }
341
+ :optional wrap-print-optional-arguments
342
+ :returns {" status" " done"
343
+ " cider/log-format-event" " The formatted log event." }}
344
+
345
+ " cider/log-inspect-event"
346
+ {:doc " Inspect a log event."
347
+ :requires {" framework" " The id of the log framework."
348
+ " appender" " The name of the appender."
349
+ " event" " The id of the event to inspect." }
350
+ :returns {" status" " done"
351
+ " value" " The inspection result." }}
352
+
353
+ " cider/log-levels"
354
+ {:doc " Return the log levels and their frequencies for the given framework and appender."
355
+ :requires {" framework" " The id of the log framework."
356
+ " appender" " The name of the appender." }
357
+ :returns {" status" " done"
358
+ " cider/log-levels" " A map from log level to event frequency." }}
359
+
360
+ " cider/log-loggers"
361
+ {:doc " Return the loggers and their frequencies for the given framework and appender."
362
+ :requires {" framework" " The id of the log framework."
363
+ " appender" " The name of the appender." }
364
+ :returns {" status" " done"
365
+ " cider/log-loggers" " A map from logger name to event frequency." }}
366
+
367
+ " cider/log-remove-appender"
368
+ {:doc " Remove an appender from a log framework."
369
+ :requires {" framework" " The id of the log framework."
370
+ " appender" " The name of the appender." }
371
+ :returns {" status" " done"
372
+ " cider/log-remove-appender" " The removed appender." }}
373
+
374
+ " cider/log-remove-consumer"
375
+ {:doc " Remove a consumer from the appender of a log framework."
376
+ :requires {" framework" " The id of the log framework."
377
+ " appender" " The name of the appender."
378
+ " consumer" " The name of the consumer." }
379
+ :returns {" status" " done"
380
+ " cider/log-add-consumer" " The removed consumer." }}
381
+
382
+ " cider/log-update-appender"
383
+ {:doc " Update the appender of a log framework."
384
+ :requires {" framework" " The id of the log framework."
385
+ " appender" " The name of the appender."
386
+ " filters" " A map from filter name to filter condition."
387
+ " size" " The number of events the appender keeps in memory."
388
+ " threshold" " The threshold in percent used to cleanup events." }
389
+ :returns {" status" " done"
390
+ " cider/log-update-appender" " The updated appender." }}
391
+
392
+ " cider/log-update-consumer"
393
+ {:doc " Update the consumer of a log appender."
394
+ :requires {" framework" " The id of the log framework."
395
+ " appender" " The name of the appender."
396
+ " consumer" " The name of the consumer."
397
+ " filters" " A map from filter name to filter condition." }
398
+ :returns {" status" " done"
399
+ " cider/log-update-consumer" " The consumer that was updated." }}
400
+
401
+ " cider/log-search"
402
+ {:doc " Search the log events of an appender."
403
+ :requires {" framework" " The id of the log framework."
404
+ " appender" " The name of the appender." }
405
+ :optional {" filters" " A map from filter name to filter condition."
406
+ " limit" " Number of log events to return." }
407
+ :returns {" status" " done"
408
+ " cider/log-search" " The list of log events matching the search." }}
409
+
410
+ " cider/log-threads"
411
+ {:doc " Return the threads and their frequencies for the given framework and appender."
412
+ :requires {" framework" " The id of the log framework."
413
+ " appender" " The name of the appender." }
414
+ :returns {" status" " done"
415
+ " cider/log-threads" " A map from thread name to event frequency." }}}})
416
+
287
417
(def-wrapper wrap-macroexpand cider.nrepl.middleware.macroexpand /handle-macroexpand
288
418
(cljs/requires-piggieback
289
419
{:doc " Macroexpansion middleware."
0 commit comments