3737
3838public class CoffeeManagerImpl extends ManagerBase implements CoffeeManager , PluggableService {
3939
40- private static final Logger LOGGER = LogManager .getLogger (CoffeeManagerImpl .class );
40+ private static final Logger s_logger = LogManager .getLogger (CoffeeManagerImpl .class );
4141
4242 private static class HardcodedCoffee implements Coffee {
4343 private final long id ;
@@ -82,19 +82,19 @@ public HardcodedCoffee(long id, String uuid, String name, Offering offering, Siz
8282 @ Override
8383 public boolean configure (String name , Map <String , Object > params ) throws ConfigurationException {
8484 super .configure (name , params );
85- LOGGER .info ("CoffeeManager is being configured" );
85+ s_logger .info ("CoffeeManager is being configured" );
8686 return true ;
8787 }
8888
8989 @ Override
9090 public boolean start () {
91- LOGGER .info ("CoffeeManager is starting" );
91+ s_logger .info ("CoffeeManager is starting" );
9292 return true ;
9393 }
9494
9595 @ Override
9696 public boolean stop () {
97- LOGGER .info ("CoffeeManager is stopping" );
97+ s_logger .info ("CoffeeManager is stopping" );
9898 return true ;
9999 }
100100
@@ -110,7 +110,7 @@ public List<Class<?>> getCommands() {
110110
111111 @ Override
112112 public Coffee createCoffee (CreateCoffeeCmd cmd ) {
113- LOGGER .info ("Creating coffee: " + cmd .getName ());
113+ s_logger .info ("Creating coffee: " + cmd .getName ());
114114 Coffee coffee = new HardcodedCoffee (
115115 3L ,
116116 "fake-uuid-3" ,
@@ -120,13 +120,13 @@ public Coffee createCoffee(CreateCoffeeCmd cmd) {
120120 Coffee .State .Created
121121 );
122122
123- LOGGER .debug ("Created coffee with ID: " + coffee .getId ());
123+ s_logger .debug ("Created coffee with ID: " + coffee .getId ());
124124 return coffee ;
125125 }
126126
127127 @ Override
128128 public List <Coffee > listCoffees (ListCoffeeCmd cmd ) {
129- LOGGER .info ("Listing coffees" );
129+ s_logger .info ("Listing coffees" );
130130 List <Coffee > coffees = new ArrayList <>();
131131
132132 coffees .add (new HardcodedCoffee (1L , "uuid-1" , "Espresso" ,
@@ -161,13 +161,13 @@ public List<Coffee> listCoffees(ListCoffeeCmd cmd) {
161161 }
162162 }
163163
164- LOGGER .debug ("Returning " + filtered .size () + " coffees" );
164+ s_logger .debug ("Returning " + filtered .size () + " coffees" );
165165 return filtered ;
166166 }
167167
168168 @ Override
169169 public Coffee updateCoffee (UpdateCoffeeCmd cmd ) {
170- LOGGER .info ("Updating coffee with ID: " + cmd .getId ());
170+ s_logger .info ("Updating coffee with ID: " + cmd .getId ());
171171
172172 HardcodedCoffee coffee = new HardcodedCoffee (
173173 Long .parseLong (cmd .getId ()),
@@ -178,16 +178,16 @@ public Coffee updateCoffee(UpdateCoffeeCmd cmd) {
178178 Coffee .State .Created
179179 );
180180
181- LOGGER .debug ("Updated coffee: " + coffee .getName ());
181+ s_logger .debug ("Updated coffee: " + coffee .getName ());
182182 return coffee ;
183183 }
184184
185185 @ Override
186186 public boolean removeCoffee (RemoveCoffeeCmd cmd ) {
187187 if (cmd .getId () != null ) {
188- LOGGER .info ("Removing coffee with ID: " + cmd .getId ());
188+ s_logger .info ("Removing coffee with ID: " + cmd .getId ());
189189 } else if (cmd .getIds () != null ) {
190- LOGGER .info ("Removing " + cmd .getIds ().size () + " coffees" );
190+ s_logger .info ("Removing " + cmd .getIds ().size () + " coffees" );
191191 }
192192
193193 return true ;
0 commit comments