In recent years, several kinds of e-learning systems, such as e-book and Learning Management System (LMS) have been widely used in the field of education. When students access these systems, their activities on the systems will be continuously and automatically recorded and stored as learning logs. As the learning logs are stored in association with students and indicate students' learning activities, most studies have been "student-based" learning log analyses focused on students and each student's learning behavior. However, the "student-based" learning log analysis focuses on each student's learning behavior during the entire lesson (for example, studied well or didn't study enough) and cannot show what they learned. Therefore, if there is a need to investigate students' learning behavior regarding each topic of the lesson, such as which topic is learned well and which not in order to optimize the syllabus, we cannot conduct "student-based" learning log analysis directly. Instead of "student-based" learning log analyses, this study describes a method of "learning-topic-based" learning log analysis. We will show how to convert a learning log associated with students into a learning-topic-associated one and shape the logs into a two-dimensional matrix of learning topics and learning activities. Then we apply Non-negative Matrix Factorization (NMF) to the matrix in order to extract the learning patterns by activity. In addition, we make a three-dimensional matrix (tensor) of students, learning topics, and learning activities by subdividing the learning activities of each learning topic by students. We then apply Non-negative Tensor Factorization (NTF) to the tensor to extract detailed learning patterns. The methods proposed in this study will help teachers to have a comprehensively view of students' learning behaviors towards each learning topic easily even if the learning log is in a large-scale, so teachers can adjust syllabus according to the attracted learning behaviors, which is helpful to increase learning efficiency.