Firefly algorithm(FA) is a very classic meta-heuristic algorithm, which is widely used in various fields to solve complex continuous optimization problems. However, in the actual engineering optimization process, the global optimization efficiency and convergence behavior of the FA need to be further improved. Therefore, we conducted modular research on the firefly algorithm and found that the attraction module of the FA has the problem of losing its attraction to distant fireflies. In order to improve the problem, an improved attractiveness module is proposed by the paper. The improved attractiveness module still has obvious attractiveness for long-distance fireflies. In order to enhance the exploration efficiency of the FA, the new firefly algorithm with an improved attractiveness module(IAM-FA) introduces a logarithmic spiral path. The IAM-FA contains 4 undetermined parameters. The four optimal parameters are determined through simulation.In the experiments on 20 benchmark functions and 4 real design cases, the IAM-FA shows excellent performance compared with other variant algorithms.