We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
To configure logging system, modify the following property files:
src/resource/ application-k8s-template.properties //Kubernetes & cluster setup
src/resource/application-onebox.properties //Local setup
Configuration items
Logging level – start log level, lower level of logs than this logging level are filtered.
Logging level of web
logging.type – console or file logging
Log file location when logging type is file
logging.level.root=info logging.level.org.springframework.web=info logging.file.path=/var/log logging.type=file
import com.futurewei.alcor.controller.logging.Logger; import com.futurewei.alcor.controller.logging.LoggerFactory;
Logger logger = LoggerFactory.getLogger();
Function format
log(Level level, String msg) log(Level level, String msg, Object s) log(Level level, String msg, Throwable e) entering(String sourceClass, String sourceMethod) exiting(String sourceClass, String sourceMethod)
e.g.)
logger.log(Level.INFO, "Alcor Controller Log Started!"); logger.exiting(this.getClass().getName(), e.getStatus()); logger.exiting(this.getClass().getName(), e); logger.entering(this.getClass().getName(),"PushNetworkResourceStates()"); logger.exiting(this.getClass().getName(),"PushNetworkResourceStates()");
sudo docker logs alcor-controller
Get alcor controller pod name.
Kubectl get pods
run command
kubectl exec my-pod -c my-container -- ls /var/log
kubectl exec alcor-5c9746c7b9-fmg2s -- ls /var/log kubectl exec alcor-5c9746c7b9-fmg2s -c alcor -- cat /var/log/AlcorLog-2020-02-10.log