Elasticity from linear and log-log regression model

I am having problem understanding the calculation of elasticity. if I am using the log-log model eg: log(Y)=constant+β1 log(X1)+β2 log(X2) . So i would get the elasticity as β1 and β2 . If I am using the same data and find the linear model without using log for example Y=constant + β1X1+β2X2 , the formula for elasticity of X1 would be β1*(X1/Y). My problem is why I the elasticity of log-log differ form the linear model when they came from the same data?
Its a multiple linear regression model. When I use log both on Y and X's variable, the coefficient should be the elasticity right? But if I am not using the log function, I need to use calculate the elasticity using the coefficient β times the average X over average Y. But although using the same data, both model give different elasticity. Are the average X divide the average Y not accurate for calculating elasticity?

And, yes I am still going through the text book mentioned.