Log recommendation plays a vital role in analyzing run-time issues including anomaly detection, performance monitoring, and security evaluation. However, existing deeplearning-based approaches for log recommendation suffer from insufficient features and low F 1 . To this end, this paper proposes a prototype called DeepLog to recommend log location based on a deep learning model. DeepLog parses the source code into an abstract syntax tree and then converts each method into a block hierarchical tree in which DeepLog extracts both semantic and syntactic features. By doing this, we construct a dataset with more than 110K samples. DeepLog employs a double-branched neural network model to recommend log locations. We evaluate the effectiveness of DeepLog by answering four research questions. The experimental results demonstrate that it can recommend 8,725 logs for 23 projects and the F 1 of DeepLog is 28.17% higher than that of the existing approaches, which improves state-of-the-art.