I want to find a way if it's possible in my case like this : I have many java class:
First :
class A{
A(){
Log.d(TAG,"message construct A");
}
public void myMethod(){
Log.d(TAG,"message A");
}
public void myAnotherMethod(){
Log.d(TAG,"message another A");
}
}
Second :
class B{
B(){
Log.d(TAG,"message construct B");
}
public void myBMethod(){
Log.d(TAG,"message B");
}
public void myAnotherBMethod(){
Log.d(TAG,"message another B");
}
}
it's quite a waste of time if i want to delete all the Log within 300 class that I have created and if I want to re-create the Log again will be very tiring for jumping from one class to another class..
I wonder if it's possible for some kind of this Log Management design :
A.class
class A{
A(){
//my code
}
public void myMethod(){
//my code
}
public void myAnotherMethod(){
//my code
}
}
B.class
class B{
B(){
//my code
}
public void myBMethod(){
//my code
}
public void myAnotherBMethod(){
//my code
}
}
and the log class management :
class Log {
onObjectCreated(){
if(object == A) Log.d(TAG,"construct A");
else Log.d(TAG,"construct B");
}
onMethodCall(){
Log.d(TAG,"message A");
}
onMethodBCall(){
Log.d(TAG,"message B");
}
}
So, in future development if I want to remove or add some Log code, I just need to manage it within one class
Is there any way for that in Native Java Android ? Thank you.