--- a/Class.st Wed Mar 01 10:39:08 2017 +0100
+++ b/Class.st Wed Mar 01 10:39:27 2017 +0100
@@ -4097,6 +4097,42 @@
^ self theMetaclass includesSelector:#start
!
+logFacility
+ "the 'log facility';
+ this is used by the Logger both as a prefix to the log message,
+ and maybe (later) used to filter and/or control per-facility log thresholds.
+ The default here is to base the facility on the package:
+ if the class is anywhere in the base ST/X system, 'STX' is returned as facility.
+ Otherwise, the last component of the package name is returned."
+
+ |pkg|
+
+ ((pkg := self package ? '???') startsWith:'stx:') ifTrue:[
+ ^ 'STX'
+ ].
+ ^ pkg copyFrom:((pkg lastIndexOf:$:) + 1)
+
+ "
+ Array logFacility
+ Array class logFacility
+ Class new logFacility
+ Behavior new logFacility
+
+ Expecco::Browser logFacility
+ Workflow::Executor logFacility
+
+ Array package
+ Array class package
+ Class new package
+ Behavior new package
+
+ Expecco::Browser package
+ Workflow::Executor package
+ "
+
+ "Created: / 01-03-2017 / 10:32:39 / cg"
+!
+
methodsForWhich:aFilter
"return a collection of methods (both class and inst) for which aFilter returns true"